Documentation
¶
Index ¶
- Constants
- Variables
- func WithInstance(instance *sql.DB, config *Config) (database.Driver, error)
- type Config
- type Postgres
- func (p *Postgres) Close() error
- func (p *Postgres) Drop() (err error)
- func (p *Postgres) ListAppliedVersions() ([]int, 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) SetSourceDriver(sourceDrv source.Driver) error
- func (p *Postgres) SetVersion(version int, dirty bool, forced bool, knownDirection *source.Direction) (*source.Direction, error)
- func (p *Postgres) Unlock() error
- func (p *Postgres) Version() (version int, dirty bool, err error)
Constants ¶
View Source
const ( LockStrategyAdvisory = "advisory" LockStrategyTable = "table" )
Variables ¶
View Source
var ( DefaultMigrationsTable = "schema_migrations" DefaultMultiStatementMaxSize = 10 * 1 << 20 // 10 MB DefaultLockTable = "schema_lock" DefaultLockStrategy = LockStrategyAdvisory )
Functions ¶
Types ¶
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
func (*Postgres) ListAppliedVersions ¶
func (*Postgres) SetSourceDriver ¶
This database driver does not currently support file sourcing.
func (*Postgres) SetVersion ¶
Click to show internal directories.
Click to hide internal directories.