Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com>
This commit is contained in:
parent
95af6096fb
commit
161e550200
1 changed files with 4 additions and 0 deletions
|
@ -502,6 +502,10 @@ func runDoctorScriptType(ctx *cli.Context) ([]string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func runDoctorCheckDBConsistency(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()
|
_, committer, err := models.TxDBContext()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Reference in a new issue