15 lines
460 B
Python
15 lines
460 B
Python
|
|
"""Database initialization utilities — used by alembic env and CLI."""
|
||
|
|
|
||
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
from sqlalchemy.ext.asyncio import AsyncSession
|
||
|
|
|
||
|
|
from app.core.settings_service import seed_default_settings
|
||
|
|
from app.migrations.seed import seed_builtin_presets
|
||
|
|
|
||
|
|
|
||
|
|
async def init_db(session: AsyncSession) -> None:
|
||
|
|
"""Seed settings + builtin presets. Idempotent."""
|
||
|
|
await seed_default_settings(session)
|
||
|
|
await seed_builtin_presets(session)
|