Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type MigrationAssets ¶
type MigrationAssets struct {
AssetNames []string
AssetFn func(name string) ([]byte, error)
TableName string
}
func GetCoreMigrationAssets ¶
func GetCoreMigrationAssets() *MigrationAssets
func GetInjectorMigrationAssets ¶
func GetInjectorMigrationAssets() *MigrationAssets
type MigrationStatus ¶
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
func NewPGMigrator ¶
func NewPGMigrator(pgURL string, migrationAssets []*MigrationAssets) (*Migrator, error)
NewPGMigrator creates a new Migrator instance for the provided Postgres URL and migration assets. The provided assets will be used to create separate migrators, each managing its own schema_migrations table under the pgstream schema. They will be applied in the order they are provided.
func (*Migrator) Down ¶
Down will revert the migrations provided in the migration assets. They will be reverted in reverse order.
func (*Migrator) Status ¶
func (m *Migrator) Status() ([]MigrationStatus, error)
Click to show internal directories.
Click to hide internal directories.