Registry / database / mattes-migrate

mattes-migrate

JSON →
library3.0.1+incompatiblegogounverified

Package migrate reads migrations from sources and runs them against databases.

go get github.com/mattes/migrate
INSTALL
IMPORT
SIG · MATTES-MIGRATE
M
mattes-migrate
databasegov3.0.1+incompatible
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

migrate
github.com/mattes/migrate

Runs database migrations from a file source.

package main import ( "github.com/mattes/migrate" _ "github.com/mattes/migrate/database/postgres" _ "github.com/mattes/migrate/source/file" ) func main() { m, err := migrate.New("file://migrations", "postgres://localhost:5432/dbname?sslmode=disable") if err != nil { panic(err) } m.Up() }
Debug
Known issues
breakingThe module path uses +incompatible versioning; prefer the maintained fork at github.com/golang-migrate/migrate.
fix
Replace import path with github.com/golang-migrate/migrate/v4.
affects: >=3.0.0
Upgrade
Version history
3.0.1+incompatiblelatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
Resources
mattes-migrate — go get mattes-migrate · libregistry