blob: 5e72e6e125b589227d3dc73b6adcbc6fd07403a0 [file] [log] [blame]
lb5tr716ecf62019-08-05 17:33:29 -07001package migrations
2
3import (
4 "code.hackerspace.pl/hscloud/go/mirko"
5 "fmt"
6 "github.com/golang-migrate/migrate/v4"
7)
8
9func New(dburl string) (*migrate.Migrate, error) {
10 source, err := mirko.NewMigrationsFromBazel(Data)
11 if err != nil {
12 return nil, fmt.Errorf("could not create migrations: %v", err)
13 }
14 return migrate.NewWithSourceInstance("bazel", source, dburl)
15}