fix(migrations): repair tenant identity lookup indexes
This commit is contained in:
@@ -320,7 +320,10 @@ MIGRATION_OWNED_TABLES_BY_REVISION["20260717_0028"] = (
|
||||
MIGRATION_OWNED_TABLES_BY_REVISION["20260717_0027"]
|
||||
| frozenset({"tenant_finance_report_configs", "tenant_finance_report_runs"})
|
||||
)
|
||||
if MIGRATION_OWNED_TABLES_BY_REVISION["20260717_0028"] != MIGRATION_OWNED_TABLES:
|
||||
MIGRATION_OWNED_TABLES_BY_REVISION["20260718_0029"] = (
|
||||
MIGRATION_OWNED_TABLES_BY_REVISION["20260717_0028"]
|
||||
)
|
||||
if MIGRATION_OWNED_TABLES_BY_REVISION["20260718_0029"] != MIGRATION_OWNED_TABLES:
|
||||
raise RuntimeError("latest Alembic revision must own the centralized migration table set")
|
||||
|
||||
# 0008 之前这三张表由旧 bootstrap / 风险服务按需创建。迁移前置检查允许
|
||||
@@ -410,6 +413,7 @@ def _validate_connection(connection: Connection) -> MigrationPreflightState:
|
||||
"20260717_0026",
|
||||
"20260717_0027",
|
||||
"20260717_0028",
|
||||
"20260718_0029",
|
||||
}
|
||||
else frozenset()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user