diff options
author | Ruby Marx <[email protected]> | 2024-02-19 18:17:00 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2024-02-19 21:17:00 -0500 |
commit | 2eec9131f85eba7976539ca7a48f43afdf3512ae (patch) | |
tree | 56629e4226202cf6bbdc925b83863c10e34816fe /migrations/versions | |
parent | d5466fff2304e863e62fe2dfc62d9e88bdeb4068 (diff) | |
download | bazarr-2eec9131f85eba7976539ca7a48f43afdf3512ae.tar.gz bazarr-2eec9131f85eba7976539ca7a48f43afdf3512ae.zip |
Added originalFormat db migration from bool to int only for Postgresqlv1.4.3-beta.0
Diffstat (limited to 'migrations/versions')
-rw-r--r-- | migrations/versions/b183a2ac0dd1 | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/migrations/versions/b183a2ac0dd1 b/migrations/versions/b183a2ac0dd1 new file mode 100644 index 000000000..3a8c16339 --- /dev/null +++ b/migrations/versions/b183a2ac0dd1 @@ -0,0 +1,28 @@ +"""Alter table_languages_profiles.originalFormat type to from bool to int + +Revision ID: b183a2ac0dd1 +Revises: 30f37e2e15e1 +Create Date: 2024-02-16 10:32:39.123456 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = 'b183a2ac0dd1' +down_revision = '30f37e2e15e1' +branch_labels = None +depends_on = None + +bind = op.get_context().bind + + +def upgrade(): + if bind.engine.name == 'postgresql': + with op.batch_alter_table('table_languages_profiles') as batch_op: + batch_op.alter_column('originalFormat', type_=sa.Integer()) + + +def downgrade(): + pass |