blob: 1782c2efb05868753759ff46bb93378581fbc34d [file] [log] [blame]
Sergiusz Bazanski1fad2e52019-08-01 20:16:27 +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}