package mysql
import "github.com/golang-migrate/migrate/v4/database/mysql"
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) Lock() error
- func (m *Mysql) Open(url string) (database.Driver, error)
- func (m *Mysql) Run(migration io.Reader) error
- func (m *Mysql) SetVersion(version int, dirty bool) error
- func (m *Mysql) Unlock() error
- func (m *Mysql) Version() (version int, dirty bool, err error)
Variables ¶
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") )
var DefaultMigrationsTable = "schema_migrations"
Functions ¶
func WithInstance ¶
instance must have `multiStatements` set to true
Types ¶
type Config ¶
type Mysql ¶
type Mysql struct {
// contains filtered or unexported fields
}
func (*Mysql) Close ¶
func (*Mysql) Drop ¶
func (*Mysql) Lock ¶
func (*Mysql) Open ¶
func (*Mysql) Run ¶
func (*Mysql) SetVersion ¶
func (*Mysql) Unlock ¶
func (*Mysql) Version ¶
Source Files ¶
- Version
- v4.7.1
- Published
- Nov 21, 2019
- Platform
- darwin/amd64
- Imports
- 13 packages
- Last checked
- 1 hour ago –
Tools for package owners.