Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Migrate ¶
type StdLogger ¶
type StdLogger struct{}
StdLogger is a helper type that simply logs to stdout using fmt. Unless you want to structure logs or redirect them in some way, this is probably what you want to use in migrate.New().
type Store ¶
type Store interface {
Open() error
Exec(string, ...interface{}) (sql.Result, error)
// CreateMetaversionIfNotExists and report the current version.
CreateMetaVersionIfNotExists() (int, error)
CreateMetaIfNotExists() error
CreateMetaCheckpointsIfNotExists() error
GetMigrations() ([]Migration, error)
InsertMigration(filename, content, checksum string) error
UpsertMigration(filename, content, checksum string) error
GetMetaCheckpoints(string) ([]string, error)
InsertMetaCheckpoint(filename, content, checksum string, idx int) error
DeleteMetaCheckpoints() error
UpgradeToV1([]Migration) error
}
Click to show internal directories.
Click to hide internal directories.