Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MigrationIncrement ¶
MigrationIncrement applies an increment to the DB
type MigrationList ¶
type MigrationList []Migration
MigrationList a slice of migration
func (MigrationList) Len ¶
func (ml MigrationList) Len() int
func (MigrationList) Less ¶
func (ml MigrationList) Less(i, j int) bool
func (MigrationList) Swap ¶
func (ml MigrationList) Swap(i, j int)
type SimpleMigration ¶
type SimpleMigration struct {
// contains filtered or unexported fields
}
SimpleMigration a simple struct where the up and down functions can be assigned by attributes
func NewSimpleMigration ¶
func NewSimpleMigration(name string, date time.Time, up, down MigrationIncrement) *SimpleMigration
NewSimpleMigration helper func for quickly declaring a simple migration
func (*SimpleMigration) Date ¶
func (tm *SimpleMigration) Date() time.Time
Date which the migration was created (not applied)
func (*SimpleMigration) Down ¶
func (tm *SimpleMigration) Down(tx *sql.Tx) error
Down the rollback decrement
func (*SimpleMigration) Name ¶
func (tm *SimpleMigration) Name() string
Name provides a human readable name
Click to show internal directories.
Click to hide internal directories.