forked from bcgov/sbc-auth
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add in data migration to create amagmation and make affiliation_invit…
…ations larger (bcgov#2656)
- Loading branch information
Showing
2 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
...api/migrations/versions/2023_12_05_144d6e8bd4df_make_affiliation_field_larger_add_amag.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
"""Add in amalgamation corp type and extend receipient fields to 8k | ||
Revision ID: 144d6e8bd4df | ||
Revises: 9e8d6b3de6d5 | ||
Create Date: 2023-12-05 11:42:32.349688 | ||
""" | ||
from alembic import op | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '144d6e8bd4df' | ||
down_revision = '9e8d6b3de6d5' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
op.execute(f"insert into corp_types (code, description, \"default\") values ('ATMP', 'Amalgamation', 'f') on conflict (code) do nothing;") | ||
op.execute('alter table affiliation_invitations alter column recipient_email type varchar(8000);') | ||
|
||
def downgrade(): | ||
op.execute('delete from corp_types where code=\'ATMP\';') | ||
op.execute('alter table affiliation_invitations alter column recipient_email type varchar(100);') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters