Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 375 Bytes

README.md

File metadata and controls

34 lines (25 loc) · 375 Bytes

migration

Usage

Create a new migration

package main

import (
	"github.com/dnnyjns/migration"
)

func main() {
  migration.Create("first_migration")
}

Run migrations

package main

import (
	_ "github.com/username/repo/migrations"
	"github.com/dnnyjns/migration"
)

func main() {
  db := setupDB()
  defer db.Close()
  migration.Run(db)
}