Skip to content

Repository files navigation

migration

GoDocTestGo Report CardcodecovGitter chat

Database Migration utility for Golang.

Example

package main
import (
"context""github.com/go-rel/doc/examples/db/migrations""github.com/go-rel/mysql""github.com/go-rel/rel""github.com/go-rel/rel/migrator"
_ "github.com/go-sql-driver/mysql"
)
funcmain() {
var (
ctx=context.TODO()
repo=rel.New(mysql.MustOpen("root@(source:3306)/rel_test?charset=utf8&parseTime=True&loc=Local"))
m=migrator.New(repo)
)
// Register migrationsm.Register(20202806225100, migrations.MigrateCreateTodos, migrations.RollbackCreateTodos)
// Run migrationsm.Migrate(ctx)
// OR:// m.Rollback(ctx)
}

More Info: https://go-rel.github.io/migration

License

Released under the MIT License

About

Database Migration utility for REL

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages