sqlmigrations

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2017 License: Apache-2.0 Imports: 18 Imported by: 106

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdditionalInitialDescriptors

func AdditionalInitialDescriptors(
	ctx context.Context, db db,
) (descriptors int, ranges int, _ error)

AdditionalInitialDescriptors returns the number of system descriptors and ranges that have been added by migrations. This is needed for certain tests, which check the number of ranges at node startup.

NOTE: This value may be out-of-date if another node is actively running migrations, and so should only be used in test code where the migration lifecycle is tightly controlled.

Types

type Manager

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

Manager encapsulates the necessary functionality for handling migrations of data in the cluster.

func NewManager

func NewManager(
	stopper *stop.Stopper,
	db *client.DB,
	executor *sql.Executor,
	clock *hlc.Clock,
	memMetrics *sql.MemoryMetrics,
	clientID string,
) *Manager

NewManager initializes and returns a new Manager object.

func (*Manager) EnsureMigrations

func (m *Manager) EnsureMigrations(ctx context.Context) error

EnsureMigrations should be run during node startup to ensure that all required migrations have been run (and running all those that are definitely safe to run).

Jump to

Keyboard shortcuts

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