migrations

package
v2.38.0-patch.2 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

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

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