fix: handle instantiated SQLAlchemy column types (#1400)

This commit is contained in:
Evgeny Volferts
2026-10-31 22:21:50 +01:00
committed by GitHub
parent 3b3b13f9ee
commit a748bfced1
+3 -1
View File
@@ -145,7 +145,9 @@ class DashboardConfig:
for col_name, col_type in expected_columns.items():
if col_name not in existing_columns:
type_str = col_type().compile(dialect=self.engine.dialect)
type_str = (
col_type if isinstance(col_type, db.types.TypeEngine) else col_type()
).compile(dialect=self.engine.dialect)
current_app.logger.info(f"Adding missing column '{col_name}' to table '{table_name}'")
preparer = self.engine.dialect.identifier_preparer
quoted_table = preparer.quote_identifier(table_name)