From b65e44e464296538e4b01d24185103ab58ca5453 Mon Sep 17 00:00:00 2001 From: Gusted Date: Tue, 28 Nov 2023 21:41:58 +0100 Subject: [PATCH] [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 6c65b6dcf6ab0d58e5c2d03a866e4e38294f72ad) --- models/migrations/migrations.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go index c6d5ea328e..d8d3c97c05 100644 --- a/models/migrations/migrations.go +++ b/models/migrations/migrations.go @@ -587,7 +587,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 nil + return forgejo_migrations.EnsureUpToDate(x) } // Migrate database to current version