mirror of
https://github.com/status-im/migrate.git
synced 2025-02-24 00:38:07 +00:00
remove scheme mysql:// prefix in sql.Open
This commit is contained in:
parent
95068e6a03
commit
cb9cddce8e
@ -12,6 +12,7 @@ import (
|
||||
"github.com/mattes/migrate/migrate/direction"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type Driver struct {
|
||||
@ -21,7 +22,7 @@ type Driver struct {
|
||||
const tableName = "schema_migrations"
|
||||
|
||||
func (driver *Driver) Initialize(url string) error {
|
||||
db, err := sql.Open("mysql", url)
|
||||
db, err := sql.Open("mysql", strings.TrimLeft(url, "mysql://"))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user