mirror of
https://github.com/beego/bee.git
synced 2024-11-26 06:21:34 +00:00
migrate. print out error message.
This commit is contained in:
parent
3c56a5feaf
commit
9f829a1da2
@ -149,6 +149,7 @@ func migrate(goal, crupath, driver, connStr string) {
|
|||||||
db, err := sql.Open(driver, connStr)
|
db, err := sql.Open(driver, connStr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ColorLog("[ERRO] Could not connect to %s: %s\n", driver, connStr)
|
ColorLog("[ERRO] Could not connect to %s: %s\n", driver, connStr)
|
||||||
|
ColorLog("[ERRO] Error: %v", err.Error())
|
||||||
os.Exit(2)
|
os.Exit(2)
|
||||||
}
|
}
|
||||||
defer db.Close()
|
defer db.Close()
|
||||||
|
Loading…
Reference in New Issue
Block a user