Description
Description
Trying to migrate Gitea from 1.22.6 to 1.23.8 (see #34275 ) on Windows, SQL Server 2019 (version 15.0.2130.3), I got the same error reported in #34275 .
Restoring Gitea 1.22.6, failed, and the log showed that the migration version has been changed to 301 (expecting version 299).
Gitea Version
1.23.8
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
2025/05/13 21:37:42 cmd/web.go:194:serveInstalled() [I] PING DATABASE mssql 2025/05/13 21:37:42 ...dels/db/collation.go:185:preprocessDatabaseCollation() [W] Current database is using a case-insensitive collation "Latin1_General_CI_AS", although Gitea could work with it, there might be some rare cases which don't work as expected. 2025/05/13 21:37:42 routers/common/db.go:31:InitDBEngine() [W] Table version Column version db default is NULL, struct default is 2025/05/13 21:37:42 ...ations/migrations.go:675:Migrate() [F] Migration Error: Your database (migration version: 302) is for a newer Gitea, you can not use the newer database for this old Gitea release (299). Gitea will exit to keep your database safe and unchanged. Please use the correct Gitea release, do not change the migration version manually (incorrect manual operation may lose data). If you are in development and really know what you're doing, you can force changing the migration version by executing: UPDATE version SET version=299 WHERE id=1;
Screenshots
No response
Git Version
No response
Operating System
Windows 10 Pro x64
How are you running Gitea?
Self-hosted, using Windows services
Database
MSSQL