roll

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VersionedSchemaName

func VersionedSchemaName(schema string, version string) string

Types

type PGVersion added in v0.4.0

type PGVersion int
const PGVersion15 PGVersion = 15

type Roll

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

func New

func New(ctx context.Context, pgURL, schema string, lockTimeoutMs int, state *state.State) (*Roll, error)

func (*Roll) Close

func (m *Roll) Close() error

func (*Roll) Complete

func (m *Roll) Complete(ctx context.Context) error

Complete will update the database schema to match the current version

func (*Roll) Init

func (m *Roll) Init(ctx context.Context) error

func (*Roll) PGVersion added in v0.4.0

func (m *Roll) PGVersion() PGVersion

func (*Roll) Rollback

func (m *Roll) Rollback(ctx context.Context) error

func (*Roll) Start

func (m *Roll) Start(ctx context.Context, migration *migrations.Migration, cbs ...migrations.CallbackFn) error

Start will apply the required changes to enable supporting the new schema version

func (*Roll) Status added in v0.4.1

func (m *Roll) Status(ctx context.Context, schema string) (*state.Status, error)

Jump to

Keyboard shortcuts

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