diff options
Diffstat (limited to 'migrations/versions')
-rw-r--r-- | migrations/versions/452dd0f0b578_.py | 4 | ||||
-rw-r--r-- | migrations/versions/b183a2ac0dd1_.py (renamed from migrations/versions/b183a2ac0dd1) | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/migrations/versions/452dd0f0b578_.py b/migrations/versions/452dd0f0b578_.py index 13e623988..a4e7b2966 100644 --- a/migrations/versions/452dd0f0b578_.py +++ b/migrations/versions/452dd0f0b578_.py @@ -1,7 +1,7 @@ """empty message Revision ID: 452dd0f0b578 -Revises: 30f37e2e15e1 +Revises: b183a2ac0dd1 Create Date: 2024-05-06 20:27:15.618027 """ @@ -11,7 +11,7 @@ import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '452dd0f0b578' -down_revision = '30f37e2e15e1' +down_revision = 'b183a2ac0dd1' branch_labels = None depends_on = None diff --git a/migrations/versions/b183a2ac0dd1 b/migrations/versions/b183a2ac0dd1_.py index 3a8c16339..a36a0caac 100644 --- a/migrations/versions/b183a2ac0dd1 +++ b/migrations/versions/b183a2ac0dd1_.py @@ -7,6 +7,7 @@ Create Date: 2024-02-16 10:32:39.123456 """ from alembic import op import sqlalchemy as sa +from app.database import TableLanguagesProfiles # revision identifiers, used by Alembic. @@ -19,6 +20,9 @@ bind = op.get_context().bind def upgrade(): + op.execute(sa.update(TableLanguagesProfiles) + .values({TableLanguagesProfiles.originalFormat: 0}) + .where(TableLanguagesProfiles.originalFormat.is_(None))) if bind.engine.name == 'postgresql': with op.batch_alter_table('table_languages_profiles') as batch_op: batch_op.alter_column('originalFormat', type_=sa.Integer()) |