Documentation
¶
Overview ¶
Package migrations embeds AuthKit's Postgres schema migrations.
Hosts should apply them via authkitmigrate, which handles pool adaptation, schema rendering, and migration tracking in one call:
migrator := authkitmigrate.New(pool, &authkitmigrate.Config{Schema: cfg.Schema})
res, err := migrator.Migrate(ctx)
The raw FS (and FSForSchema for a non-default schema) remains exported for external migration runners.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var FS = migrationFS
FS exposes the embedded SQL for external runners. It targets the default "profiles" schema; see FSForSchema for a configurable schema.
Functions ¶
func FSForSchema ¶ added in v0.26.0
FSForSchema returns the embedded migrations rendered for the given schema: every reference to the default "profiles" schema in the DDL (CREATE SCHEMA, qualified table/function names, table_schema string literals) is replaced with the configured name. The schema must match ^[a-z_][a-z0-9_]*$ (max 63 bytes). For "profiles" (or empty) it returns the embedded FS unchanged, so callers can pass embedded.Client.Schema() unconditionally.
This is a deliberate, validated text substitution performed once at load time — the embedded files themselves are never modified, and the FS export above keeps its historical behavior.
Types ¶
This section is empty.