提交 60995198 编写于 作者: M Maxime Beauchemin 提交者: Beto Dealmeida

Using batch_op in db migration 0b1f1ab473c0 (#6581)

As I needed to downgrade from db migration 0b1f1ab473c0, I realized I
needed to use batch_op against SQLLite.
上级 b1649879
......@@ -14,8 +14,10 @@ down_revision = '55e910a74826'
def upgrade():
op.add_column('query', sa.Column('extra_json', sa.Text(), nullable=True))
with op.batch_alter_table('query') as batch_op:
batch_op.add_column(sa.Column('extra_json', sa.Text(), nullable=True))
def downgrade():
op.drop_column('query', 'extra_json')
with op.batch_alter_table('query') as batch_op:
batch_op.drop_column('extra_json')
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册