Package Postgres migrations with user-engine
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s

This commit is contained in:
tegwick 2026-07-27 23:20:40 +02:00
parent 2869c1030d
commit c27012afe5
4 changed files with 71 additions and 10 deletions

View file

@ -9,7 +9,7 @@ from __future__ import annotations
import json
from contextlib import contextmanager
from pathlib import Path
from importlib.resources import files
from typing import Any, Iterable, Iterator, Mapping, Protocol, cast
from user_engine.domain import (
@ -624,9 +624,10 @@ def _first_column(row: Any) -> Any:
def _load_bootstrap_sql() -> str:
repo_root = Path(__file__).resolve().parents[3]
return (repo_root / "migrations/postgres/0001_user_engine_store.sql").read_text(
encoding="utf-8"
return (
files("user_engine")
.joinpath("migrations/postgres/0001_user_engine_store.sql")
.read_text(encoding="utf-8")
)