]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
initial draft : setting found_table properly so as to also reflect existing tables...
authorSumit Khanna <ksumeet40@gmail.com>
Thu, 30 Sep 2021 07:00:17 +0000 (12:30 +0530)
committerSumit Khanna <ksumeet40@gmail.com>
Thu, 30 Sep 2021 07:00:17 +0000 (12:30 +0530)
lib/sqlalchemy/engine/reflection.py

index 715781b7a3d1f47186b582dcdd2301b800aa5232..79d480091b29f4452e1480d17253579df00428c0 100644 (file)
@@ -768,14 +768,12 @@ class Inspector(object):
             if isinstance(table_name, str):
                 table_name = table_name.decode(dialect.encoding)
 
-        found_table = False
+        found_table = True if table.name in self.engine.table_names() else False
         cols_by_orig_name = {}
 
         for col_d in self.get_columns(
             table_name, schema, **table.dialect_kwargs
         ):
-            found_table = True
-
             self._reflect_column(
                 table,
                 col_d,