Skip to content

Commit e6c2bbb

Browse files
author
Stanley Kudrow
committed
update the _alembic_reflect_table (not with the solution from xzkostyan#369)
1 parent 3706f36 commit e6c2bbb

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

clickhouse_sqlalchemy/alembic/comparators.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,16 @@
1717
)
1818

1919

20-
def _get_reflected_table(connection, table_name, schema=None):
21-
# Для Alembic < 1.11
20+
def _alembic_reflect_table(connection, table_name, schema=None):
2221
if alembic_version < (1, 11):
2322
from alembic.util.sqla_compat import _reflect_table
24-
2523
return _reflect_table(connection, table_name, schema)
2624

27-
# Для Alembic >= 1.11
2825
inspector = inspect(connection)
2926
columns = inspector.get_columns(table_name, schema=schema)
30-
# Соберите Table объект при необходимости
3127
return columns
3228

3329

34-
_alembic_reflect_table = _get_reflected_table
35-
36-
3730
def _extract_to_table_name(create_table_query):
3831
query = create_table_query
3932
# Naive inner name detection

0 commit comments

Comments
 (0)