test database is connect OK after db config initialized (#239)

tokarchuk/v1.17
Lunny Xiao 8 years ago committed by GitHub
parent ba2e75a0ab
commit 450969c158
  1. 4
      models/models.go

@ -196,6 +196,10 @@ func NewEngine() (err error) {
return err return err
} }
if err = x.Ping(); err != nil {
return err
}
if err = migrations.Migrate(x); err != nil { if err = migrations.Migrate(x); err != nil {
return fmt.Errorf("migrate: %v", err) return fmt.Errorf("migrate: %v", err)
} }

Loading…
Cancel
Save