Fix query error when no schema name was provided
This commit is contained in:
parent
0ebacc4842
commit
42f58417e9
@ -87,9 +87,11 @@ func Migrate(db *sql.DB, version int, o Options, asset AssetFunc) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = tx.Exec(`SET search_path TO ` + o.Schema + `,public`)
|
if o.Schema != `` {
|
||||||
if err != nil {
|
_, err = tx.Exec(`SET search_path TO ` + o.Schema + `,public`)
|
||||||
return err
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
err = tx.Commit()
|
err = tx.Commit()
|
||||||
|
Loading…
Reference in New Issue
Block a user