authkitmigrate

package
v0.100.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package authkitmigrate installs AuthKit's schema using the host's PostgreSQL connection configuration. Migrate is idempotent and returns only an error; Validate requires exact identity and content of every installed migration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Schema is the Postgres schema AuthKit's tables live in; it must match
	// embedded.Config.Schema. Empty defaults to "profiles".
	Schema string
}

Config configures a Migrator.

type Migrator

type Migrator struct {
	// contains filtered or unexported fields
}

Migrator applies AuthKit's Postgres migrations. Construct with New.

func New

func New(pool *pgxpool.Pool, config *Config) *Migrator

New returns a Migrator over the same pool the host passes to embedded.New. A nil config targets the default "profiles" schema.

func (*Migrator) Migrate

func (m *Migrator) Migrate(ctx context.Context) error

Migrate applies the fresh baseline and pending migrations. Earlier prerelease schemas or unknown/drifted ledger identities are refused without deleting data.

func (*Migrator) Validate

func (m *Migrator) Validate(ctx context.Context) error

Validate requires every current migration with exact identity, digests and applied status. It performs no migration or repair.

Jump to

Keyboard shortcuts

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