1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-23 08:47:42 -05:00

[DB] Ensure forgejo migration up to date (squash)

- Backport https://codeberg.org/forgejo/forgejo/pulls/1849
- Hook Forgejo's `EnsureUpToDate` to Gitea's `EnsureUpToDate`, such that
the Forgejo migrations are also being checked to be up to date.
- I'm not sure how I missed this and if this has caused any problems,
but due to the lack of any open issue about it it seems to not be a big
problem.

(cherry picked from commit 6c65b6dcf6)
This commit is contained in:
Gusted 2023-11-28 21:41:58 +01:00
parent 684f56dd6d
commit 457564044a
No known key found for this signature in database
GPG key ID: FD821B732837125F

View file

@ -544,7 +544,7 @@ func EnsureUpToDate(x *xorm.Engine) error {
return fmt.Errorf(`Current database version %d is not equal to the expected version %d. Please run "forgejo [--config /path/to/app.ini] migrate" to update the database version`, currentDB, expected) return fmt.Errorf(`Current database version %d is not equal to the expected version %d. Please run "forgejo [--config /path/to/app.ini] migrate" to update the database version`, currentDB, expected)
} }
return nil return forgejo_migrations.EnsureUpToDate(x)
} }
// Migrate database to current version // Migrate database to current version