From d94e78e79fcb4c6e2901c907a5e34c71a4b9d791 Mon Sep 17 00:00:00 2001 From: "kacper.golem" Date: Tue, 28 May 2024 07:43:19 +0200 Subject: [PATCH] FIX-OCT-1492: fix migration file --- .../1f5a0f69733a_unify_proposals_to_projects.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/backend/migrations/versions/1f5a0f69733a_unify_proposals_to_projects.py b/backend/migrations/versions/1f5a0f69733a_unify_proposals_to_projects.py index 49ef8d1303..6fdaab35b6 100644 --- a/backend/migrations/versions/1f5a0f69733a_unify_proposals_to_projects.py +++ b/backend/migrations/versions/1f5a0f69733a_unify_proposals_to_projects.py @@ -16,15 +16,9 @@ def upgrade(): with op.batch_alter_table("allocations", schema=None) as batch_op: - batch_op.add_column( - sa.Column("project_address", sa.String(length=42), nullable=False) - ) - batch_op.drop_column("proposal_address") + batch_op.alter_column("proposal_address", new_column_name="project_address") def downgrade(): with op.batch_alter_table("allocations", schema=None) as batch_op: - batch_op.add_column( - sa.Column("proposal_address", sa.VARCHAR(length=42), nullable=False) - ) - batch_op.drop_column("project_address") + batch_op.alter_column("project_address", new_column_name="proposal_address")