From 0ffc66aba0f386d1134c7d1ac3ce90d67d3f46b2 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Fri, 27 Nov 2015 11:23:53 +0100 Subject: [PATCH] Move sequence renaming. --- .../versions/144929e0f5f_improve_operation_scheduling.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/migrations/versions/144929e0f5f_improve_operation_scheduling.py b/migrations/versions/144929e0f5f_improve_operation_scheduling.py index efc5903..0cdbc64 100644 --- a/migrations/versions/144929e0f5f_improve_operation_scheduling.py +++ b/migrations/versions/144929e0f5f_improve_operation_scheduling.py @@ -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(