From 07ff61fc33ef09fe203e33286846877a13a4184c Mon Sep 17 00:00:00 2001 From: "kacper.golem" Date: Tue, 28 May 2024 07:41:08 +0200 Subject: [PATCH] FIX-OCT-1576: fix altering migration --- ...3cfdd_unify_all_individual_rewards_to_vanilla_.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/migrations/versions/58536423cfdd_unify_all_individual_rewards_to_vanilla_.py b/backend/migrations/versions/58536423cfdd_unify_all_individual_rewards_to_vanilla_.py index 6a3495d89f..f211126fdc 100644 --- a/backend/migrations/versions/58536423cfdd_unify_all_individual_rewards_to_vanilla_.py +++ b/backend/migrations/versions/58536423cfdd_unify_all_individual_rewards_to_vanilla_.py @@ -16,15 +16,15 @@ def upgrade(): with op.batch_alter_table("pending_epoch_snapshots", schema=None) as batch_op: - batch_op.add_column( - sa.Column("vanilla_individual_rewards", sa.String(), nullable=False) + batch_op.alter_column( + column_name="all_individual_rewards", + new_column_name="vanilla_individual_rewards", ) - batch_op.drop_column("all_individual_rewards") def downgrade(): with op.batch_alter_table("pending_epoch_snapshots", schema=None) as batch_op: - batch_op.add_column( - sa.Column("all_individual_rewards", sa.VARCHAR(), nullable=False) + batch_op.alter_column( + column_name="vanilla_individual_rewards", + new_column_name="all_individual_rewards", ) - batch_op.drop_column("vanilla_individual_rewards")