fix: migration script can't drop constraint (#15807)

This commit is contained in:
Beto Dealmeida
2021-07-20 17:24:58 -07:00
committed by GitHub
parent 5cc95bb378
commit 6cb91ee142
2 changed files with 10 additions and 6 deletions

View File

@@ -30,7 +30,7 @@ from flask_appbuilder import Model
from flask_migrate import downgrade, upgrade
from graphlib import TopologicalSorter # pylint: disable=wrong-import-order
from progress.bar import ChargingBar
from sqlalchemy import create_engine, inspect, Table
from sqlalchemy import create_engine, inspect
from sqlalchemy.ext.automap import automap_base
from superset import db
@@ -172,7 +172,6 @@ def main(
rows = session.query(model).count()
print(f"- {model.__name__} ({rows} rows in table {model.__tablename__})")
model_rows[model] = rows
session.close()
print("Benchmarking migration")
results: Dict[str, float] = {}