mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-22 07:42:32 +00:00
Added originalFormat db migration from bool to int only for Postgresql
This commit is contained in:
parent
d5466fff23
commit
2eec9131f8
1 changed files with 28 additions and 0 deletions
28
migrations/versions/b183a2ac0dd1
Normal file
28
migrations/versions/b183a2ac0dd1
Normal file
|
@ -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
|
Loading…
Reference in a new issue