Documentation ¶
Index ¶
- Variables
- func WithInstance(instance *sql.DB, config *Config) (database.Driver, error)
- type Config
- type Mysql
- func (m *Mysql) Close() error
- func (m *Mysql) Drop() (err error)
- func (m *Mysql) ListAppliedVersions() ([]int, error)
- func (m *Mysql) Lock() error
- func (m *Mysql) Open(url string) (database.Driver, error)
- func (m *Mysql) Run(migration io.Reader) error
- func (m *Mysql) SetSourceDriver(sourceDrv source.Driver) error
- func (m *Mysql) SetVersion(version int, dirty bool, forced bool, knownDirection *source.Direction) (*source.Direction, error)
- func (m *Mysql) Unlock() error
- func (m *Mysql) Version() (version int, dirty bool, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultMigrationsTable = "schema_migrations" DefaultHistoryTable = "schema_migrations_history" )
View Source
var ( ErrDatabaseDirty = fmt.Errorf("database is dirty") ErrNilConfig = fmt.Errorf("no config") ErrNoDatabaseName = fmt.Errorf("no database name") ErrAppendPEM = fmt.Errorf("failed to append PEM") ErrTLSCertKeyConfig = fmt.Errorf("To use TLS client authentication, both x-tls-cert and x-tls-key must not be empty") )
Functions ¶
Types ¶
type Mysql ¶
type Mysql struct {
// contains filtered or unexported fields
}
func WithConnection ¶
connection instance must have `multiStatements` set to true
func (*Mysql) ListAppliedVersions ¶
func (*Mysql) SetVersion ¶
Click to show internal directories.
Click to hide internal directories.