lb5tr | 716ecf6 | 2019-08-05 17:33:29 -0700 | [diff] [blame] | 1 | package migrations |
2 | |||||
3 | import ( | ||||
4 | "code.hackerspace.pl/hscloud/go/mirko" | ||||
5 | "fmt" | ||||
6 | "github.com/golang-migrate/migrate/v4" | ||||
7 | ) | ||||
8 | |||||
9 | func 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 | } |