Open and WithInstance need to guarantee that config is never nil
Locking and unlocking need to use the same connection
db*sql.DBisLockedbool(*T) Close() error(*T) Drop() (err error)
https://www.postgresql.org/docs/9.6/static/explicit-locking.html#ADVISORY-LOCKS
(*T) Open(url string) (database.Driver, error)(*T) Run(migration io.Reader) error(*T) SetVersion(version int, dirty bool) error(*T) Unlock() error(*T) Version() (version int, dirty bool, err error)
ensureVersionTable checks if versions table exists and, if not, creates it.
Note that this function locks the database, which deviates from the usual
convention of "caller locks" in the Postgres type.
*T : github.com/golang-migrate/migrate/v4/database.Driver
*T : io.Closer
Package-Level Functions (total 5, in which 1 are exported)
The pages are generated with Goldsv0.3.2-preview. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.