Skip to content

Commit 488ab73

Browse files
committed
Using engine.has_table rather than inspector for DB validation
- Inspector does not return our tables for some reason for MySQL
1 parent 94c14cc commit 488ab73

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

rdflib_sqlalchemy/store.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -835,11 +835,9 @@ def _verify_store_exists(self):
835835
836836
"""
837837

838-
inspector = reflection.Inspector.from_engine(self.engine)
839-
existing_table_names = inspector.get_table_names()
840838
for table_name in self.table_names:
841-
if table_name not in existing_table_names:
842-
_logger.critical("create_all() - table %s Doesn't exist!", table_name)
839+
if not self.engine.has_table(table_name):
840+
_logger.critical("create_all() - table %s is not known", table_name)
843841
# The database exists, but one of the tables doesn't exist
844842
return CORRUPTED_STORE
845843

0 commit comments

Comments
 (0)