mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
compile and update migration package
This commit is contained in:
parent
9723c7373a
commit
88f7f0f61c
|
@ -1,15 +1,24 @@
|
|||
package mysql
|
||||
|
||||
import (
|
||||
"github.com/c9s/rockhopper"
|
||||
|
||||
"fmt"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/c9s/rockhopper"
|
||||
)
|
||||
|
||||
var registeredGoMigrations map[int64]*rockhopper.Migration
|
||||
|
||||
func Migrations() rockhopper.MigrationSlice {
|
||||
var migrations = rockhopper.MigrationSlice{}
|
||||
for _, migration := range registeredGoMigrations {
|
||||
migrations = append(migrations, migration)
|
||||
}
|
||||
|
||||
return migrations.SortAndConnect()
|
||||
}
|
||||
|
||||
// AddMigration adds a migration.
|
||||
func AddMigration(up, down rockhopper.TransactionHandler) {
|
||||
pc, filename, _, _ := runtime.Caller(1)
|
||||
|
|
|
@ -1,15 +1,24 @@
|
|||
package sqlite3
|
||||
|
||||
import (
|
||||
"github.com/c9s/rockhopper"
|
||||
|
||||
"fmt"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/c9s/rockhopper"
|
||||
)
|
||||
|
||||
var registeredGoMigrations map[int64]*rockhopper.Migration
|
||||
|
||||
func Migrations() rockhopper.MigrationSlice {
|
||||
var migrations = rockhopper.MigrationSlice{}
|
||||
for _, migration := range registeredGoMigrations {
|
||||
migrations = append(migrations, migration)
|
||||
}
|
||||
|
||||
return migrations.SortAndConnect()
|
||||
}
|
||||
|
||||
// AddMigration adds a migration.
|
||||
func AddMigration(up, down rockhopper.TransactionHandler) {
|
||||
pc, filename, _, _ := runtime.Caller(1)
|
||||
|
|
Loading…
Reference in New Issue
Block a user