From: Sumit Khanna Date: Thu, 30 Sep 2021 07:00:17 +0000 (+0530) Subject: initial draft : setting found_table properly so as to also reflect existing tables... X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8df30ea9e3f17714ba92aeec23ba5b72120e6b2a;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git initial draft : setting found_table properly so as to also reflect existing tables but with no columns --- diff --git a/lib/sqlalchemy/engine/reflection.py b/lib/sqlalchemy/engine/reflection.py index 715781b7a3..79d480091b 100644 --- a/lib/sqlalchemy/engine/reflection.py +++ b/lib/sqlalchemy/engine/reflection.py @@ -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,