Registry / database / golang-migrate-migrate-v4

golang-migrate-migrate-v4

JSON →
library4.19.1gogounverified

Reads database migrations from sources and runs them against databases.

go get github.com/golang-migrate/migrate/v4
INSTALL
IMPORT
SIG · GOLANG-MIGRATE-MIG
G
golang-migrate-migrate-v4
databasegov4.19.1
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/golang-migrate/migrate/v4

Runs all pending migrations from a file source to a Postgres database.

package main import ( "log" "github.com/golang-migrate/migrate/v4" _ "github.com/golang-migrate/migrate/v4/database/postgres" _ "github.com/golang-migrate/migrate/v4/source/file" ) func main() { m, err := migrate.New("file://migrations", "postgres://localhost:5432/dbname") if err != nil { log.Fatal(err) } m.Up() }
Debug
Known issues
breakingVersion v4 has breaking changes from v3, including import path and API.
fix
Use v4 import path and update migration source/database drivers accordingly.
affects: >=4.0.0
Upgrade
Version history
4.19.1latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
10
Resources
golang-migrate-migrate-v4 — go get golang-migrate-migrate-v4 · libregistry