mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-09-16 14:57:15 +00:00
test(persistence): align standalone migration fixtures with current models
This commit is contained in:
@@ -16,7 +16,9 @@ import sqlalchemy
|
|||||||
from sqlalchemy import text
|
from sqlalchemy import text
|
||||||
from sqlalchemy.ext.asyncio import create_async_engine
|
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.entity.persistence.base import Base
|
||||||
|
from langbot.pkg.utils import importutil
|
||||||
from langbot.pkg.persistence.alembic_runner import (
|
from langbot.pkg.persistence.alembic_runner import (
|
||||||
run_alembic_downgrade,
|
run_alembic_downgrade,
|
||||||
run_alembic_upgrade,
|
run_alembic_upgrade,
|
||||||
@@ -28,6 +30,11 @@ from alembic.config import Config
|
|||||||
from alembic.script import ScriptDirectory
|
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:
|
def _get_script_head() -> str:
|
||||||
"""Resolve the current Alembic head revision from the script directory.
|
"""Resolve the current Alembic head revision from the script directory.
|
||||||
|
|
||||||
|
|||||||
@@ -856,7 +856,7 @@ class TestPostgreSQLTenantRuntime:
|
|||||||
adapter='capacity-probe',
|
adapter='capacity-probe',
|
||||||
adapter_config={},
|
adapter_config={},
|
||||||
enable=False,
|
enable=False,
|
||||||
pipeline_routing_rules=[],
|
event_bindings=[],
|
||||||
),
|
),
|
||||||
persistence_pipeline.LegacyPipeline(
|
persistence_pipeline.LegacyPipeline(
|
||||||
uuid=f'capacity-pipeline-{suffix}',
|
uuid=f'capacity-pipeline-{suffix}',
|
||||||
|
|||||||
Reference in New Issue
Block a user