mirror of https://github.com/pressly/goose.git
Support mysql driver
parent
a72c5a598e
commit
60e5a5f618
|
@ -101,6 +101,10 @@ func newDBDriver(name, open string) DBDriver {
|
|||
d.Import = "github.com/ziutek/mymysql/godrv"
|
||||
d.Dialect = &MySqlDialect{}
|
||||
|
||||
case "mysql":
|
||||
d.Import = "github.com/go-sql-driver/mysql"
|
||||
d.Dialect = &MySqlDialect{}
|
||||
|
||||
case "sqlite3":
|
||||
d.Import = "github.com/mattn/go-sqlite3"
|
||||
d.Dialect = &Sqlite3Dialect{}
|
||||
|
|
|
@ -4,9 +4,6 @@ import (
|
|||
"database/sql"
|
||||
"errors"
|
||||
"fmt"
|
||||
_ "github.com/lib/pq"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
_ "github.com/ziutek/mymysql/godrv"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
@ -15,6 +12,11 @@ import (
|
|||
"strings"
|
||||
"text/template"
|
||||
"time"
|
||||
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
_ "github.com/lib/pq"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
_ "github.com/ziutek/mymysql/godrv"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
Loading…
Reference in New Issue