test(persistence): align standalone migration fixtures with current models

This commit is contained in:
dadachann
2026-09-11 04:43:38 +00:00
parent ce3f10a3ea
commit 3b047ab080
2 changed files with 8 additions and 1 deletions
@@ -16,7 +16,9 @@ import sqlalchemy
from sqlalchemy import text
from sqlalchemy.ext.asyncio import create_async_engine
from langbot.pkg.entity import persistence
from langbot.pkg.entity.persistence.base import Base
from langbot.pkg.utils import importutil
from langbot.pkg.persistence.alembic_runner import (
run_alembic_downgrade,
run_alembic_upgrade,
@@ -28,6 +30,11 @@ from alembic.config import Config
from alembic.script import ScriptDirectory
# Match PersistenceManager's model registration before create_all, including
# workspace foreign-key targets, without relying on other tests being collected.
importutil.import_modules_in_pkg(persistence)
def _get_script_head() -> str:
"""Resolve the current Alembic head revision from the script directory.
@@ -856,7 +856,7 @@ class TestPostgreSQLTenantRuntime:
adapter='capacity-probe',
adapter_config={},
enable=False,
pipeline_routing_rules=[],
event_bindings=[],
),
persistence_pipeline.LegacyPipeline(
uuid=f'capacity-pipeline-{suffix}',