Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Migrate ¶
Migrate applies all pending migrations to db. It is idempotent: already-applied migrations are skipped. The zitadel_nextgen schema is created if it does not exist, since the goose tracking table lives there.
Concurrent callers — parallel test packages sharing one database, or several nodes starting at once — are serialized with the same session advisory lock for schema creation and goose's run: two concurrent goose runs can each see a migration as pending and race its DDL (CREATE TYPE has no IF NOT EXISTS, so the loser fails on pg_type's unique index). Goose runs SQL migrations on the locked connection, so single-connection pools remain supported.
Types ¶
This section is empty.