summaryrefslogtreecommitdiffstats
path: root/models/migrations/migrations.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/migrations/migrations.go')
-rw-r--r--models/migrations/migrations.go5
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)