This website works better with JavaScript.
Home
Explore
Help
Sign In
closed-social
/
gitea
Watch
3
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Projects
0
Releases
0
Wiki
Activity
Browse Source
add unsupported migration prompt
for-closed-social
Unknwon
9 years ago
parent
144663a3cf
commit
eb30cbab81
1 changed files
with
5 additions
and
0 deletions
Unified View
Diff Options
Show Stats
Download Patch File
Download Diff File
+5
-0
models/migrations/migrations.go
+ 5
- 0
models/migrations/migrations.go
View File
@ -106,6 +106,11 @@ func Migrate(x *xorm.Engine) error {
}
}
v
:=
currentVersion
.
Version
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
)
{
if
int
(
v
-
_MIN_DB_VER
)
>
len
(
migrations
)
{
// User downgraded Gogs.
// User downgraded Gogs.
currentVersion
.
Version
=
int64
(
len
(
migrations
)
+
_MIN_DB_VER
)
currentVersion
.
Version
=
int64
(
len
(
migrations
)
+
_MIN_DB_VER
)
Write
Preview
Loading…
Cancel
Save