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 Oct 26, 2023
1 parent 8735f50 commit 9e33c77
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 9e33c77

Please sign in to comment.