Documentation
¶
Overview ¶
Package store owns the Postgres connection pool and the migration runner. It holds no domain logic: every domain package receives a *pgxpool.Pool.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Connect ¶
Connect opens a pgx pool for dsn and verifies it with a Ping. The caller owns the returned pool and must Close it.
func Migrate ¶
Migrate applies every embedded migration that has not been applied yet, in lexicographic filename order, each file in its own transaction. Applied files are recorded in dilion_meta.schema_migrations. It is safe to call concurrently: runs are serialised with a Postgres advisory lock. Progress is logged to log (slog.Default() when nil), tagged with the instance selected on ctx.
Types ¶
This section is empty.