-
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.
- Loading branch information
1 parent
a6e5857
commit f0ce055
Showing
2 changed files
with
45 additions
and
3 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
migrations/versions/20240830_1617_f9426dfd57e2_change_to_nullable_events_id.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,42 @@ | ||
"""change to nullable events_id | ||
Revision ID: f9426dfd57e2 | ||
Revises: eba63ac1dd15 | ||
Create Date: 2024-08-30 16:17:30.062783 | ||
""" | ||
|
||
import os | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'f9426dfd57e2' | ||
down_revision = 'eba63ac1dd15' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
op.alter_column( | ||
'diff', 'events_id', existing_type=postgresql.ARRAY(sa.INTEGER()), nullable=True, schema='STG_RASPHYSMSU' | ||
) | ||
op.alter_column( | ||
'new', 'events_id', existing_type=postgresql.ARRAY(sa.INTEGER()), nullable=True, schema='STG_RASPHYSMSU' | ||
) | ||
op.alter_column( | ||
'old', 'events_id', existing_type=postgresql.ARRAY(sa.INTEGER()), nullable=True, schema='STG_RASPHYSMSU' | ||
) | ||
|
||
|
||
def downgrade(): | ||
op.alter_column( | ||
'old', 'events_id', existing_type=postgresql.ARRAY(sa.INTEGER()), nullable=False, schema='STG_RASPHYSMSU' | ||
) | ||
op.alter_column( | ||
'new', 'events_id', existing_type=postgresql.ARRAY(sa.INTEGER()), nullable=False, schema='STG_RASPHYSMSU' | ||
) | ||
op.alter_column( | ||
'diff', 'events_id', existing_type=postgresql.ARRAY(sa.INTEGER()), nullable=False, schema='STG_RASPHYSMSU' | ||
) |
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