mirror of https://github.com/status-im/migrate.git
fix mysql
This commit is contained in:
parent
5b6715333f
commit
c1f0a1a044
|
@ -5,6 +5,7 @@ import (
|
||||||
"github.com/mattes/migrate/file"
|
"github.com/mattes/migrate/file"
|
||||||
"github.com/mattes/migrate/migrate/direction"
|
"github.com/mattes/migrate/migrate/direction"
|
||||||
pipep "github.com/mattes/migrate/pipe"
|
pipep "github.com/mattes/migrate/pipe"
|
||||||
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -14,7 +15,7 @@ func TestMigrate(t *testing.T) {
|
||||||
driverUrl := "mysql://root@tcp(127.0.0.1:3306)/migratetest"
|
driverUrl := "mysql://root@tcp(127.0.0.1:3306)/migratetest"
|
||||||
|
|
||||||
// prepare clean database
|
// prepare clean database
|
||||||
connection, err := sql.Open("mysql", driverUrl)
|
connection, err := sql.Open("mysql", strings.SplitN(driverUrl, "mysql://", 2)[1])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue