diff --git a/alembic/versions/644ef887bb6f_add_close_status.py b/alembic/versions/644ef887bb6f_add_close_status.py index 9a20a41..b9407b8 100644 --- a/alembic/versions/644ef887bb6f_add_close_status.py +++ b/alembic/versions/644ef887bb6f_add_close_status.py @@ -51,15 +51,15 @@ def upgrade(): session.add(ticket_stat) session.commit() - # Remove the old status - op.execute('''DELETE FROM "status_issue" WHERE "status" NOT IN ('Open', 'Closed'); ''') - # Set the close_status for all the closed tickets op.execute('''UPDATE "issues" SET "close_status"=status where status != 'Open'; ''') # Mark all the tickets as closed op.execute('''UPDATE "issues" SET status='Closed' where status != 'Open'; ''') + # Remove the old status + op.execute('''DELETE FROM "status_issue" WHERE "status" NOT IN ('Open', 'Closed'); ''') + def downgrade(): ''' Add the column _close_status to the table projects.