dbmigrate

package
v0.0.0-...-56664c1 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ComponentUsageAuthority = "usage-authority"
	ComponentConcurrency    = "concurrency"
	ComponentMetering       = "metering"
	ComponentBilling        = "billing"
)

Variables

This section is empty.

Functions

func MigrateComponents

func MigrateComponents(ctx context.Context, database *bun.DB, components []string) error

MigrateComponents runs DDL migrations for the named dual-plane components on an already-open admin handle. Verification stays with the caller (CLI verify pass or runtime OpenStore readiness).

func ParseComponents

func ParseComponents(raw string) ([]string, error)

func PostgresComponents

func PostgresComponents(ctx context.Context, dsn string, components []string) error

func SwapLookupPostgresComponentForTest

func SwapLookupPostgresComponentForTest(fn func(component string) (func(context.Context, *bun.DB) error, func(context.Context, *bun.DB) error, error)) (restore func())

SwapLookupPostgresComponentForTest replaces component lookup for tests outside this package. Call the returned restore from t.Cleanup.

Types

This section is empty.

Jump to

Keyboard shortcuts

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