Documentation
¶
Index ¶
- Constants
- type Logger
- type LoggerFunc
- type Migration
- type Migrator
- func (m *Migrator) Add(mi ...*Migration)
- func (m *Migrator) BeginTx() (*sql.Tx, error)
- func (m *Migrator) CountApplied() (int, error)
- func (m *Migrator) Exec(query string, args ...string) error
- func (m *Migrator) Migrate() error
- func (m *Migrator) Pending() ([]*Migration, error)
- func (m *Migrator) TableDrop(table string) error
- type Option
Constants ¶
View Source
const DefaultTableName = "schema_migrations"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoggerFunc ¶
type LoggerFunc func(string, ...interface{})
LoggerFunc adapts Logger and any third party logger
func (LoggerFunc) Printf ¶
func (f LoggerFunc) Printf(msg string, args ...interface{})
Printf implements Logger interface
type Migration ¶
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
func (*Migrator) CountApplied ¶
type Option ¶
type Option func(migrate *Migrator)
func WithEmbedFS ¶
func WithLogger ¶
func WithSchemaFile ¶
func WithSchemaString ¶
func WithTableName ¶
Click to show internal directories.
Click to hide internal directories.