diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2016-11-24 22:30:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-24 22:30:36 +0800 |
commit | 450969c158d36e40b28b89f4fcb0ed89f885ea01 (patch) | |
tree | 46102abdff9e4c454b5d0e350d590ccca865dfbf /models/models.go | |
parent | ba2e75a0ab6d8be5e6c92e30e221c3528b22d2a8 (diff) | |
download | gitea-450969c158d36e40b28b89f4fcb0ed89f885ea01.tar.gz gitea-450969c158d36e40b28b89f4fcb0ed89f885ea01.zip |
test database is connect OK after db config initialized (#239)
Diffstat (limited to 'models/models.go')
-rw-r--r-- | models/models.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/models/models.go b/models/models.go index a95468e036..3a83929a77 100644 --- a/models/models.go +++ b/models/models.go @@ -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) } |