Decouple scopes from tenancy schema
Some checks failed
Dependency Audit / dependency-audit (push) Has been cancelled
Module Matrix / module-matrix (push) Has been cancelled

This commit is contained in:
2026-07-10 17:33:43 +02:00
parent 635d25c74c
commit 79af252e88
27 changed files with 529 additions and 75 deletions

View File

@@ -13,6 +13,7 @@ from govoplan_core.db.base import Base
from govoplan_core.server.default_config import get_server_config
from govoplan_core.server.registry import build_platform_registry
from govoplan_core.settings import settings
from govoplan_core.tenancy.scope import scope_registry
config = context.config
database_url = config.attributes.get("database_url") or settings.database_url
@@ -30,7 +31,7 @@ def _target_metadata():
enabled_modules,
manifest_factories=manifest_factories,
)
plan = migration_metadata_plan(registry, extra_metadata=(Base.metadata,))
plan = migration_metadata_plan(registry, extra_metadata=(scope_registry.metadata, Base.metadata))
return tuple(dict.fromkeys(plan.metadata))