Documentation
¶
Overview ¶
Package migrations embeds Credbound's Goose-compatible PostgreSQL migrations. Filenames are timestamps, so lexical order is application order and they interleave safely with a host's own Goose migrations. Hosts either hand PostgreSQL() to goose or call ApplyPostgreSQL for a dependency-free application path.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyPostgreSQL ¶
ApplyPostgreSQL applies every embedded PostgreSQL migration that has not run yet, in filename order, each inside its own transaction together with its bookkeeping row. The bookkeeping table lives on the connection's default search_path; the migrations themselves create and fill the dedicated credbound schema. It is idempotent across restarts and is the minimal alternative for hosts that do not run goose. Concurrent runs are safe: a session-level advisory lock serializes instances that start simultaneously, and each migration re-checks its bookkeeping row inside the transaction. A migration file whose content changed after it was applied fails with a checksum error instead of being silently ignored.
func PostgreSQL ¶
PostgreSQL returns the embedded PostgreSQL migrations as a Goose-compatible fs.FS. Every Credbound object they create lives in the dedicated credbound schema.
Types ¶
This section is empty.