remove route-runmigraions

This commit is contained in:
Cadey Ratio 2018-02-20 23:21:56 -08:00
parent 3fb8c73d97
commit e3238c19c3
1 changed files with 0 additions and 43 deletions

View File

@ -1,43 +0,0 @@
package main
import (
"log"
"git.xeserv.us/xena/route/internal/database/dmigrations"
"github.com/caarlos0/env"
"github.com/mattes/migrate"
_ "github.com/mattes/migrate/database/postgres"
bindata "github.com/mattes/migrate/source/go-bindata"
)
type config struct {
DatabaseURL string `env:"DATABASE_URL,required"`
}
func main() {
var cfg config
err := env.Parse(&cfg)
if err != nil {
log.Fatal(err)
}
s := bindata.Resource(dmigrations.AssetNames(),
func(name string) ([]byte, error) {
return dmigrations.Asset(name)
})
d, err := bindata.WithInstance(s)
if err != nil {
log.Fatal(err)
}
m, err := migrate.NewWithSourceInstance("go-bindata", d, cfg.DatabaseURL)
if err != nil {
log.Fatal(err)
}
err = m.Up()
if err != nil {
log.Fatal(err)
}
}