Move sequence renaming.

This commit is contained in:
Alexis Lahouze 2015-11-27 11:23:53 +01:00
parent 76247fe541
commit 0ffc66aba0

View File

@ -63,9 +63,6 @@ def upgrade():
def downgrade():
op.get_bind().execute(
"alter sequence operation_id_seq rename to entry_id_seq"
)
op.create_table(
"canceled_operation",
@ -79,6 +76,9 @@ def downgrade():
op.drop_column('operation', 'canceled')
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.get_bind().execute(