Skip to content

A half-provisioned tenant schema fails seven changes' verify scripts #330

Description

@perigrin

Found while probing #324's migration in the round-7 review. Pre-existing and out of that PR's scope.

A tenant row whose schema exists but is empty (no tables) makes sqitch verify fail hard for seven changes: events-and-sessions, fix-tenant-workflows, payments-amount-cents, refund-amounts-cents, payments-typed-obligation, and two others — seven errors in a single run.

enrollment-reenrol-after-drop is the one that stays ok, because its loop guards with both information_schema.schemata and to_regclass(format('%I.enrollments', s)). Schema existence is not table existence, and only the second guard catches that.

The fixture is trivially reproducible now: create a tenant row and its schema without running clone_schema.

Worth fixing because sqitch.conf sets [deploy] verify = true, so any of these can block a deploy on a database that has one half-provisioned tenant.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions