1.22 to 1.23 migration issue: wrong index name #33724
Labels
issue/needs-feedback
For bugs, we need more details. For features, the feature must be described in more detail
type/bug
Description
Hi,
I'm trying to upgrade gitea from version 1.22 to 1.23, but the migration process fails on that line of migrations.go:
newMigration(299, "Add content version to issue and comment table", v1_23.AddContentVersionToIssueAndComment),
Here are the logs:
2025/02/25 16:26:17 routers/common/db.go:30:InitDBEngine() [I] ORM engine initialization attempt #10/10... 2025/02/25 16:26:17 cmd/web.go:205:serveInstalled() [I] PING DATABASE sqlite3 2025/02/25 16:26:17 routers/common/db.go:31:InitDBEngine() [W] Table version column id db type is , struct type is INTEGER 2025/02/25 16:26:17 routers/common/db.go:31:InitDBEngine() [W] Table version Column id db nullable is true, struct nullable is false 2025/02/25 16:26:17 routers/common/db.go:31:InitDBEngine() [W] Table version column version db type is , struct type is INTEGER 2025/02/25 16:26:17 ...ations/migrations.go:494:Migrate() [I] Migration[299]: Add content version to issue and comment table 2025/02/25 16:26:17 routers/init.go:74:mustInitCtx() [F] code.gitea.io/gitea/routers/common.InitDBEngine(ctx) failed: migrate: migration[299]: Add content version to issue and comment table failed: no such index: **IDX_comment_idx_comment_issue_id**
Seems like it's looking for an index that doesn't exist, as I think it should be looking for idx_comment_issue_id instead (that does exist in my DB, I checked).
I couldn't find any information on that strange behavior, any ideas ?
Gitea Version
1.22
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
DSM 7
How are you running Gitea?
It runs on my Synology NAS. I tried:
Database
SQLite
The text was updated successfully, but these errors were encountered: