From f34fedfb745fa9d60f8a724ab595d862133e6dc0 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 26 Apr 2022 11:49:40 +0200 Subject: [PATCH] fix migration file --- .../migrations/versions/6f6771813f2e_change_wbid_for_sid.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ereuse_devicehub/migrations/versions/6f6771813f2e_change_wbid_for_sid.py b/ereuse_devicehub/migrations/versions/6f6771813f2e_change_wbid_for_sid.py index 6debf4dd..7eac98fd 100644 --- a/ereuse_devicehub/migrations/versions/6f6771813f2e_change_wbid_for_sid.py +++ b/ereuse_devicehub/migrations/versions/6f6771813f2e_change_wbid_for_sid.py @@ -25,7 +25,7 @@ def get_inv(): def upgrade_datas(): con = op.get_bind() - sql = f"select wbid from {get_inv()}.snapshot;" + sql = f"select * from {get_inv()}.snapshot;" snapshots = con.execute(sql) for snap in snapshots: wbid = snap.wbid @@ -50,8 +50,6 @@ def upgrade(): sa.Column('sid', citext.CIText(), nullable=True), schema=f'{get_inv()}', ) - upgrade_datas() - op.drop_column('snapshot', 'wbid', schema=f'{get_inv()}') op.add_column( 'snapshot_errors',