소스 검색

add unsupported migration prompt

tags/v0.9.99
Unknwon 8 년 전
부모
커밋
eb30cbab81
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5
    0
      models/migrations/migrations.go

+ 5
- 0
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)

Loading…
취소
저장