fix migration file

This commit is contained in:
Cayo Puigdefabregas 2022-04-26 11:49:40 +02:00
parent 53a43ff6cb
commit f34fedfb74
1 changed files with 1 additions and 3 deletions

View File

@ -25,7 +25,7 @@ def get_inv():
def upgrade_datas(): def upgrade_datas():
con = op.get_bind() con = op.get_bind()
sql = f"select wbid from {get_inv()}.snapshot;" sql = f"select * from {get_inv()}.snapshot;"
snapshots = con.execute(sql) snapshots = con.execute(sql)
for snap in snapshots: for snap in snapshots:
wbid = snap.wbid wbid = snap.wbid
@ -50,8 +50,6 @@ def upgrade():
sa.Column('sid', citext.CIText(), nullable=True), sa.Column('sid', citext.CIText(), nullable=True),
schema=f'{get_inv()}', schema=f'{get_inv()}',
) )
upgrade_datas()
op.drop_column('snapshot', 'wbid', schema=f'{get_inv()}')
op.add_column( op.add_column(
'snapshot_errors', 'snapshot_errors',