package postgres
import "github.com/golang-migrate/migrate/v4/database/postgres"
Index ¶
- Variables
- func WithInstance(instance *sql.DB, config *Config) (database.Driver, error)
- type Config
- type Postgres
- func (p *Postgres) Close() error
- func (p *Postgres) Drop() 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)
Variables ¶
var ( ErrNilConfig = fmt.Errorf("no config") ErrNoDatabaseName = fmt.Errorf("no database name") ErrNoSchema = fmt.Errorf("no schema") ErrDatabaseDirty = fmt.Errorf("database is dirty") )
var DefaultMigrationsTable = "schema_migrations"
Functions ¶
func WithInstance ¶
Types ¶
type Config ¶
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
func (*Postgres) Close ¶
func (*Postgres) Drop ¶
func (*Postgres) Lock ¶
https://www.postgresql.org/docs/9.6/static/explicit-locking.html#ADVISORY-LOCKS
func (*Postgres) Open ¶
func (*Postgres) Run ¶
func (*Postgres) SetVersion ¶
func (*Postgres) Unlock ¶
func (*Postgres) Version ¶
Source Files ¶
- Version
- v4.0.0
- Published
- Oct 10, 2018
- Platform
- linux/amd64
- Imports
- 11 packages
- Last checked
- 43 minutes ago –
Tools for package owners.