Skip to content

Commit

Permalink
SA2.0: Do not bind MetaData: must use engine explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavcs committed Nov 14, 2023
1 parent 706e977 commit 0aad7ba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/check_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ def load_indexes(metadata):

# create EMPTY metadata, then load from database
db_url = get_config(sys.argv)["db_url"]
metadata = MetaData(bind=create_engine(db_url))
metadata.reflect()
metadata = MetaData()
engine = create_engine(db_url)
metadata.reflect(bind=engine)
indexes_in_db = load_indexes(metadata)

all_indexes = set(mapping_indexes.keys()) | set(tsi_mapping_indexes.keys())
Expand Down

0 comments on commit 0aad7ba

Please sign in to comment.