16 lines
335 B
Go
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)
|
||
|
}
|