Skip to content

Commit

Permalink
Add missing check for go-gitea#11111 backport
Browse files Browse the repository at this point in the history
  • Loading branch information
guillep2k committed May 30, 2020
1 parent 95af609 commit 74dbf1a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/doctor.go
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,10 @@ func runDoctorScriptType(ctx *cli.Context) ([]string, error) {
}

func runDoctorCheckDBConsistency(ctx *cli.Context) ([]string, error) {
// make sure DB version is uptodate
if err := models.NewEngine(context.Background(), migrations.EnsureUpToDate); err != nil {
return nil, fmt.Errorf("model version on the database does not match the current Gitea version. Model consistency will not be checked until the database is upgraded")
}
_, committer, err := models.TxDBContext()
if err != nil {
return nil, err
Expand Down

0 comments on commit 74dbf1a

Please sign in to comment.