mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-10 15:22:24 -05:00
notify-api-332 rename organisation
This commit is contained in:
29
migrations/versions/0396_rename_organisation.py
Normal file
29
migrations/versions/0396_rename_organisation.py
Normal file
@@ -0,0 +1,29 @@
|
||||
"""
|
||||
|
||||
Revision ID: d2db89558026
|
||||
Revises: 0395_add_total_message_limit
|
||||
Create Date: 2023-04-27 14:59:39.428607
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
revision = '0396_rename_organisation'
|
||||
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')
|
||||
op.execute('ALTER TABLE user_to_organisation RENAME to user_to_organization')
|
||||
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')
|
||||
|
||||
def downgrade():
|
||||
pass
|
||||
Reference in New Issue
Block a user