Browse Source

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

for-closed-social
Lunny Xiao 8 years ago
committed by GitHub
parent
commit
450969c158
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      models/models.go

+ 4
- 0
models/models.go View File

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

Loading…
Cancel
Save