mirror of
https://github.com/apache/superset.git
synced 2026-05-29 11:45:16 +00:00
perf: improve perf in SIP-68 migration (#19416)
* chore: improve perf in SIP-68 migration
* Small fixes
* Create tables referenced in SQL
* Update logic in SqlaTable as well
* Fix unit tests
(cherry picked from commit 63b5e2e4fa)
This commit is contained in:
committed by
Ville Brofeldt
parent
ba22905610
commit
038d114b07
@@ -102,7 +102,10 @@ def find_models(module: ModuleType) -> List[Type[Model]]:
|
||||
while tables:
|
||||
table = tables.pop()
|
||||
seen.add(table)
|
||||
model = getattr(Base.classes, table)
|
||||
try:
|
||||
model = getattr(Base.classes, table)
|
||||
except AttributeError:
|
||||
continue
|
||||
model.__tablename__ = table
|
||||
models.append(model)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user