Documentation
¶
Index ¶
- type Migration
- func (m *Migration) Close() error
- func (m *Migration) Config() *config.Config
- func (m *Migration) CreateMigrationTable() error
- func (m *Migration) Down() error
- func (m *Migration) DownAll() error
- func (m *Migration) FindFileByVersion(version string, migrationType string) *MigrationFile
- func (m *Migration) GetCurrentVersion() string
- func (m *Migration) HardReset() error
- func (m *Migration) IsMigrationApplied(version string) (bool, error)
- func (m *Migration) Load(path string) error
- func (m *Migration) RunSingleDown(file MigrationFile) error
- func (m *Migration) RunSingleUp(file MigrationFile) error
- func (m *Migration) SoftReset() error
- func (m *Migration) Status() ([]SchemaMigrationStatus, error)
- func (m *Migration) Up() error
- func (m *Migration) Versions() []string
- type MigrationFile
- type SchemaMigration
- type SchemaMigrationStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Migration ¶
type Migration struct { CurrentVersion string UpFiles []MigrationFile DownFiles []MigrationFile // contains filtered or unexported fields }
func (*Migration) CreateMigrationTable ¶
func (*Migration) FindFileByVersion ¶
func (m *Migration) FindFileByVersion(version string, migrationType string) *MigrationFile
func (*Migration) GetCurrentVersion ¶
func (*Migration) IsMigrationApplied ¶
func (*Migration) RunSingleDown ¶
func (m *Migration) RunSingleDown(file MigrationFile) error
func (*Migration) RunSingleUp ¶
func (m *Migration) RunSingleUp(file MigrationFile) error
func (*Migration) Status ¶
func (m *Migration) Status() ([]SchemaMigrationStatus, error)
type MigrationFile ¶
func (*MigrationFile) IsDown ¶
func (mf *MigrationFile) IsDown() bool
func (*MigrationFile) IsUp ¶
func (mf *MigrationFile) IsUp() bool
func (*MigrationFile) Version ¶
func (mf *MigrationFile) Version() string
type SchemaMigration ¶
Click to show internal directories.
Click to hide internal directories.