mirror of
https://github.com/apache/superset.git
synced 2026-04-18 07:35:09 +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
This commit is contained in:
@@ -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