Versions in this module Expand all Collapse all v4 v4.18.4 Sep 26, 2024 v4.18.3 Sep 26, 2024 Changes in this version + const LockStrategyAdvisory + const LockStrategyTable + var DefaultLockStrategy = LockStrategyAdvisory + var DefaultLockTable = "schema_lock" + var DefaultMigrationsTable = "schema_migrations" + var DefaultMultiStatementMaxSize = 10 * 1 << 20 + var ErrDatabaseDirty = fmt.Errorf("database is dirty") + var ErrNilConfig = fmt.Errorf("no config") + var ErrNoDatabaseName = fmt.Errorf("no database name") + var ErrNoSchema = fmt.Errorf("no schema") + func WithInstance(instance *sql.DB, config *Config) (database.Driver, error) + type Config struct + DatabaseName string + LockStrategy string + LockTable string + MigrationsTable string + MigrationsTableQuoted bool + MultiStatementEnabled bool + MultiStatementMaxSize int + SchemaName string + StatementTimeout time.Duration + type Postgres struct + func (p *Postgres) Close() error + func (p *Postgres) Drop() (err error) + func (p *Postgres) Lock() error + func (p *Postgres) Open(url string) (database.Driver, error) + func (p *Postgres) Run(migration io.Reader) error + func (p *Postgres) SetVersion(version int, dirty bool) error + func (p *Postgres) Unlock() error + func (p *Postgres) Version() (version int, dirty bool, err error)