From 6e442d71e69e687b3e84778fe092f2e1a14d58aa Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Mon, 10 Jul 2023 11:31:05 -0700 Subject: [PATCH] change order of db operations --- migrations/versions/0396_rename_organisation.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/migrations/versions/0396_rename_organisation.py b/migrations/versions/0396_rename_organisation.py index 87afa7ff1..db14a18a4 100644 --- a/migrations/versions/0396_rename_organisation.py +++ b/migrations/versions/0396_rename_organisation.py @@ -16,7 +16,6 @@ down_revision = '0395_remove_intl_letters_perm' def upgrade(): op.execute('ALTER TABLE services RENAME COLUMN organisation_type to organization_type') op.execute('ALTER TABLE services_history RENAME COLUMN organisation_type to organization_type') - op.execute('ALTER TABLE organization RENAME COLUMN organisation_type to organization_type') op.execute('ALTER TABLE services RENAME COLUMN organisation_id to organization_id') op.execute('ALTER TABLE services_history RENAME COLUMN organisation_id to organization_id') op.execute('ALTER TABLE domain RENAME COLUMN organisation_id to organization_id') @@ -24,6 +23,9 @@ def upgrade(): op.execute('ALTER TABLE invited_organisation_users RENAME to invited_organization_users') op.execute('ALTER TABLE user_to_organization RENAME COLUMN organisation_id to organization_id') op.execute('ALTER TABLE invited_organization_users RENAME COLUMN organisation_id to organization_id') + op.execute('ALTER TABLE organisation RENAME COLUMN organisation_type to organization_type') + op.execute('ALTER TABLE organisation RENAME to organization') + def downgrade(): pass