parser/internal/migrations/migrations.go
2018-05-07 14:07:37 +02:00

16 lines
335 B
Go

package migrations
import (
"database/sql"
"git.fuyu.moe/Fuyu/migrate"
)
//go:generate go-bindata -pkg migrations --prefix files -nomemcopy -nometadata files
// RunMigrations runs all migrations
func RunMigrations(db *sql.DB) error {
version := len(AssetNames())
return migrate.Migrate(db, version, migrate.Options{}, Asset)
}