schema

package
v1.4.3-prerelease07 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 17 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Update

func Update(ctx context.Context, options Options) error

Update updates the schema for all DBs referenced in the specified config

func Verify

func Verify(ctx context.Context, opts Options) error

Types

type Options

type Options struct {
	// Required
	// ClusterName is the name of the current cluster
	ClusterName string
	// Config is the persistence config to use for connecting to the DBs. It must be non-nil.
	Config *config.Persistence
	// Optional
	// SetupOptions are parameters passed to SetupDB.Setup. Defaults to empty
	SetupOptions map[string]string
	// Logger is the logger. Defaults to zap production defaults
	Logger log.Logger
	// ConnectTimeout is the amount of time allowed to spend connecting to all DB instances. Defaults to 10s.
	// During this time period, any errors are retried with a short backoff. This is to tolerate the DBs not yet
	// being available.
	ConnectTimeout time.Duration
	// Time is the time source. Defaults to real time.
	Time clock.TimeSource
	// DefaultDomain is the name of a domain that should be created automatically if it doesn't exist. This is intended
	// only to be used as part of auto-setup.
	// Defaults to "", meaning no domain will be created.
	DefaultDomain string
	// Resume allows the first schema update applied to each DB to skip DDL statements whose schema element already
	// exists. This supports resuming a schema update that was interrupted after applying some, but not all, of its
	// statements. Defaults to false.
	Resume bool
}

func OptionsFromConfig

func OptionsFromConfig(cfg config.Config) Options

Jump to

Keyboard shortcuts

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