Skip to content
Snippets Groups Projects
Commit 8514233e authored by f00wl's avatar f00wl
Browse files

Use batch mode for migration

parent c8f3d8a3
No related branches found
No related tags found
1 merge request!31Resolve "Support du 2FA TOTP"
......@@ -17,12 +17,10 @@ depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('auth', sa.Column('realm', sa.String(length=25), server_default='password', nullable=True))
# ### end Alembic commands ###
with op.batch_alter_table('auth') as batch_op:
batch_op.add_column(sa.Column('realm', sa.String(length=25), server_default='password', nullable=True))
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('auth', 'realm')
# ### end Alembic commands ###
with op.batch_alter_table('auth') as batch_op:
batch_op.drop_column('realm')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment