migrations

package
v2.20.0-testing-infra-689 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMigrationsTable = "schema_migrations"
	DefaultSchema          = "hdb_catalog"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CatalogStateStore

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

from v1.4 clients are expected to make use of the catalog API rather than assuming a SQL backend for metadata storage

func (*CatalogStateStore) GetVersions

func (m *CatalogStateStore) GetVersions(database string) (map[uint64]bool, error)

func (*CatalogStateStore) InsertVersion

func (m *CatalogStateStore) InsertVersion(database string, version int64) error

func (*CatalogStateStore) PrepareMigrationsStateStore

func (m *CatalogStateStore) PrepareMigrationsStateStore(_ string) error

func (*CatalogStateStore) RemoveVersion

func (m *CatalogStateStore) RemoveVersion(database string, version int64) error

func (*CatalogStateStore) SetVersion

func (m *CatalogStateStore) SetVersion(database string, version int64, dirty bool) error

func (*CatalogStateStore) SetVersions

func (m *CatalogStateStore) SetVersions(database string, versions []statestore.Version) error

type MigrationStateStoreHdbTable

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

until version 1.4 migration state was stored a special table this struct will implement the methods required

func NewMigrationStateStoreHdbTable

func NewMigrationStateStoreHdbTable(client hasura.PGSourceOps, schema, table string) *MigrationStateStoreHdbTable

func (*MigrationStateStoreHdbTable) GetVersions

func (m *MigrationStateStoreHdbTable) GetVersions(sourceName string) (map[uint64]bool, error)

func (*MigrationStateStoreHdbTable) InsertVersion

func (m *MigrationStateStoreHdbTable) InsertVersion(sourceName string, version int64) error

func (*MigrationStateStoreHdbTable) PrepareMigrationsStateStore

func (m *MigrationStateStoreHdbTable) PrepareMigrationsStateStore(sourceName string) error

func (*MigrationStateStoreHdbTable) RemoveVersion

func (m *MigrationStateStoreHdbTable) RemoveVersion(sourceName string, version int64) error

func (*MigrationStateStoreHdbTable) SetVersion

func (m *MigrationStateStoreHdbTable) SetVersion(sourceName string, version int64, dirty bool) error

func (*MigrationStateStoreHdbTable) SetVersions

func (m *MigrationStateStoreHdbTable) SetVersions(sourceName string, versions []statestore.Version) error

SetVersions is similar to SetVersion defined above. with the only difference, this is adapted to accept multiple versions

Jump to

Keyboard shortcuts

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