Fixes to the downgrade migration for user_id in sqlatables

This commit is contained in:
Michelle Thomas 2015-12-17 11:28:06 -08:00
parent 6f948f0783
commit f24e58abf2
1 changed files with 3 additions and 4 deletions

View File

@ -21,7 +21,6 @@ def upgrade():
def downgrade():
with op.batch_alter_table('tables'):
op.drop_constraint(None, 'tables', type_='foreignkey')
op.drop_column('tables', 'user_id')
with op.batch_alter_table('tables') as batch_op:
batch_op.drop_constraint('user_id', type_='foreignkey')
batch_op.drop_column('user_id')