migration

package
v1.0.0-alpha.24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Migrate

func Migrate(ctx context.Context, db *sql.DB) (err error)

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.

Directories

Path Synopsis
sql
user_examples command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL