Move sequence renaming.

This commit is contained in:
Alexis Lahouze 2015-11-27 11:23:53 +01:00
parent cdd321e1ee
commit d04ee3874b

View File

@ -63,9 +63,6 @@ def upgrade():
def downgrade(): def downgrade():
op.get_bind().execute(
"alter sequence operation_id_seq rename to entry_id_seq"
)
op.create_table( op.create_table(
"canceled_operation", "canceled_operation",
@ -79,6 +76,9 @@ def downgrade():
op.drop_column('operation', 'canceled') op.drop_column('operation', 'canceled')
op.drop_column('operation', 'confirmed') op.drop_column('operation', 'confirmed')
op.get_bind().execute(
"alter sequence operation_id_seq rename to entry_id_seq"
)
op.rename_table('operation', 'entry') op.rename_table('operation', 'entry')
op.get_bind().execute( op.get_bind().execute(