mirror of
https://github.com/morpheus65535/bazarr
synced 2025-01-22 23:08:46 +00:00
Fixed latest migration that cleared history for sqlite users.
This commit is contained in:
parent
81159a0978
commit
0ddadb273e
1 changed files with 8 additions and 27 deletions
|
@ -15,40 +15,21 @@ down_revision = '195144da1f7e'
|
||||||
branch_labels = None
|
branch_labels = None
|
||||||
depends_on = None
|
depends_on = None
|
||||||
|
|
||||||
|
bind = op.get_context().bind
|
||||||
|
|
||||||
|
|
||||||
def upgrade():
|
def upgrade():
|
||||||
# ### commands auto generated by Alembic - please adjust! ###
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
with op.batch_alter_table('table_episodes', schema=None) as batch_op:
|
if bind.engine.name == 'postgresql':
|
||||||
batch_op.alter_column('file_size',
|
with op.batch_alter_table('table_episodes') as batch_op:
|
||||||
existing_type=sa.INTEGER(),
|
batch_op.alter_column('file_size', type_=sa.BigInteger())
|
||||||
type_=sa.BigInteger(),
|
|
||||||
existing_nullable=True,
|
|
||||||
existing_server_default=sa.text('0'))
|
|
||||||
|
|
||||||
with op.batch_alter_table('table_movies', schema=None) as batch_op:
|
|
||||||
batch_op.alter_column('file_size',
|
|
||||||
existing_type=sa.INTEGER(),
|
|
||||||
type_=sa.BigInteger(),
|
|
||||||
existing_nullable=True,
|
|
||||||
existing_server_default=sa.text('0'))
|
|
||||||
|
|
||||||
|
with op.batch_alter_table('table_movies') as batch_op:
|
||||||
|
batch_op.alter_column('file_size', type_=sa.BigInteger())
|
||||||
# ### end Alembic commands ###
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
def downgrade():
|
def downgrade():
|
||||||
# ### commands auto generated by Alembic - please adjust! ###
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
with op.batch_alter_table('table_movies', schema=None) as batch_op:
|
pass
|
||||||
batch_op.alter_column('file_size',
|
|
||||||
existing_type=sa.BigInteger(),
|
|
||||||
type_=sa.INTEGER(),
|
|
||||||
existing_nullable=True,
|
|
||||||
existing_server_default=sa.text('0'))
|
|
||||||
|
|
||||||
with op.batch_alter_table('table_episodes', schema=None) as batch_op:
|
|
||||||
batch_op.alter_column('file_size',
|
|
||||||
existing_type=sa.BigInteger(),
|
|
||||||
type_=sa.INTEGER(),
|
|
||||||
existing_nullable=True,
|
|
||||||
existing_server_default=sa.text('0'))
|
|
||||||
|
|
||||||
# ### end Alembic commands ###
|
# ### end Alembic commands ###
|
||||||
|
|
Loading…
Reference in a new issue