2023-08-09 00:05:06 +02:00
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
|
|
|
package forgejo
|
|
|
|
|
|
|
|
import (
|
|
|
|
"code.gitea.io/gitea/models/db"
|
|
|
|
"code.gitea.io/gitea/modules/log"
|
|
|
|
"code.gitea.io/gitea/modules/setting"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2023-08-09 00:06:25 +02:00
|
|
|
ForgejoV6DatabaseVersion = int64(261) // must be updated once v6 / Gitea v1.21 is out
|
2023-08-09 00:05:06 +02:00
|
|
|
ForgejoV5DatabaseVersion = int64(260)
|
|
|
|
ForgejoV4DatabaseVersion = int64(244)
|
|
|
|
)
|
|
|
|
|
|
|
|
var logFatal = log.Fatal
|
|
|
|
|
|
|
|
func fatal(err error) error {
|
|
|
|
logFatal("%v", err)
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
func PreMigrationSanityChecks(e db.Engine, dbVersion int64, cfg setting.ConfigProvider) error {
|
2023-08-09 00:06:25 +02:00
|
|
|
return v1TOv5_0_1Included(e, dbVersion, cfg)
|
2023-08-09 00:05:06 +02:00
|
|
|
}
|