flyway

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStarter added in v1.4.4

func NewStarter(datasource ...string) bean.Bean

Types

type Configure

type Configure struct {
	types.AutoConfigure   `prefix:"application.flyway"`
	Enable                bool   `yaml:"enable"`
	Locations             string `yaml:"locations"`
	Table                 string `yaml:"table"`
	SqlMigrationPrefix    string `yaml:"sql_migration_prefix"`
	SqlMigrationSuffixes  string `yaml:"sql_migration_suffixes"`
	SqlMigrationSeparator string `yaml:"sql_migration_separator"`
}

type FlywaySchemaHistory

type FlywaySchemaHistory struct {
	InstalledRank int        `gorm:"primaryKey;column:installed_rank;type:int(11);not null" json:"installedRank"`
	Version       string     `gorm:"column:version;type:varchar(50)" json:"version"`
	Description   string     `gorm:"column:description;type:varchar(200);not null" json:"description"`
	Type          string     `gorm:"column:type;type:varchar(20);not null" json:"type"`
	Script        string     `gorm:"column:script;type:varchar(1000);not null" json:"script"`
	Checksum      string     `gorm:"column:checksum;type:varchar(50)" json:"checksum"`
	InstalledBy   string     `gorm:"column:installed_by;type:varchar(100);not null" json:"installedBy"`
	InstalledOn   *time.Time `gorm:"column:installed_on;type:timestamp;not null;default:CURRENT_TIMESTAMP" json:"installedOn"`
	ExecutionTime int        `gorm:"column:execution_time;type:int(11);not null" json:"executionTime"`
	Success       bool       `gorm:"index:flyway_schema_history_s_idx;column:success;type:tinyint(1);not null" json:"success"`
}

func (FlywaySchemaHistory) String

func (f FlywaySchemaHistory) String() string

type Migrator

type Migrator struct {
	Conf *Configure

	Log log.Logger `wire:""`
	// contains filtered or unexported fields
}

func NewGormMigrator

func NewGormMigrator(db *gorm.DB) *Migrator

func (*Migrator) Execute

func (r *Migrator) Execute() error

Jump to

Keyboard shortcuts

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