mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-22 01:44:24 +01:00
[DB] Ensure forgejo migration up to date (squash)
- 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:
parent
58657fff86
commit
6d45c37d84
|
@ -48,10 +48,6 @@ package "code.gitea.io/gitea/models/forgejo/semver"
|
|||
func SetVersionString
|
||||
func SetVersion
|
||||
|
||||
package "code.gitea.io/gitea/models/forgejo_migrations"
|
||||
func GetCurrentDBVersion
|
||||
func EnsureUpToDate
|
||||
|
||||
package "code.gitea.io/gitea/models/git"
|
||||
func RemoveDeletedBranchByID
|
||||
|
||||
|
|
|
@ -597,7 +597,7 @@ func EnsureUpToDate(x *xorm.Engine) error {
|
|||
return fmt.Errorf(`Current database version %d is not equal to the expected version %d. Please run "gitea [--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
|
||||
|
|
Loading…
Reference in a new issue