diff options
author | Unknwon <u@gogs.io> | 2015-11-25 09:27:27 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-11-25 09:27:27 -0500 |
commit | eb30cbab81934da0b338eee8ea7aac0643f3865a (patch) | |
tree | ca418d281b561c70c70e3764fa6fe4aa9846e91e /models/migrations | |
parent | 144663a3cfcdebf16755e4d65e1e50ac91593eca (diff) | |
download | gitea-eb30cbab81934da0b338eee8ea7aac0643f3865a.tar.gz gitea-eb30cbab81934da0b338eee8ea7aac0643f3865a.zip |
add unsupported migration prompt
Diffstat (limited to 'models/migrations')
-rw-r--r-- | models/migrations/migrations.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go index 0d17cf2691..3fc59e6b8d 100644 --- a/models/migrations/migrations.go +++ b/models/migrations/migrations.go @@ -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) |