mirror of https://github.com/status-im/migrate.git
Crate driver was using wrong url scheme. The migrate CLI never had a chance to select the correct driver
This commit is contained in:
parent
a7fa9eb3fb
commit
6612806e06
|
@ -23,6 +23,7 @@ type Driver struct {
|
|||
const tableName = "schema_migrations"
|
||||
|
||||
func (driver *Driver) Initialize(url string) error {
|
||||
url = strings.Replace(url, "crate", "http", 1)
|
||||
db, err := sql.Open("crate", url)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
@ -14,7 +14,7 @@ func TestMigrate(t *testing.T) {
|
|||
host := os.Getenv("CRATE_PORT_4200_TCP_ADDR")
|
||||
port := os.Getenv("CRATE_PORT_4200_TCP_PORT")
|
||||
|
||||
url := fmt.Sprintf("http://%s:%s", host, port)
|
||||
url := fmt.Sprintf("crate://%s:%s", host, port)
|
||||
|
||||
driver := &Driver{}
|
||||
|
||||
|
|
Loading…
Reference in New Issue