roll

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 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 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) 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

Jump to

Keyboard shortcuts

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