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