1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-02 08:57:32 -04:00

add unsupported migration prompt

This commit is contained in:
Unknwon 2015-11-25 09:27:27 -05:00
parent 144663a3cf
commit eb30cbab81

View File

@ -106,6 +106,11 @@ func Migrate(x *xorm.Engine) error {
}
v := currentVersion.Version
if _MIN_DB_VER > v {
log.Fatal(4, "Gogs no longer supports auto-migration from your previously installed version. Please try to upgrade to a lower version first, then upgrade to current version.")
return nil
}
if int(v-_MIN_DB_VER) > len(migrations) {
// User downgraded Gogs.
currentVersion.Version = int64(len(migrations) + _MIN_DB_VER)