Database migration error when migrating from v1.11.8 to v1.12.1 #5712

Closed
opened 2025-11-02 06:33:48 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @StdioA on GitHub (Jul 9, 2020).

Description

SQLite database migration cannot process because of wrong index name IDX_review_"idx_review_IDX_review_reviewer_id" and others.
I can also reproduce this issue under gitea v1.12.0.

Seems like those index names (e.g. idx_review_IDX_review_reviewer_id) in my database is irregular. Maybe they are created by a broken migration script.

Originally created by @StdioA on GitHub (Jul 9, 2020). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): v1.12.1 - Git version: 2.20.1 - Operating system: Raspbian GNU/Linux 10 (buster) - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: https://gist.github.com/StdioA/45a5fc14dc1cdb7a1d72ab37bdf36e23 ## Description SQLite database migration cannot process because of wrong index name `IDX_review_"idx_review_IDX_review_reviewer_id"` and others. I can also reproduce this issue under gitea v1.12.0. Seems like those index names (e.g. `idx_review_IDX_review_reviewer_id`) in my database is irregular. Maybe they are created by a broken migration script.
Author
Owner

@StdioA commented on GitHub (Jul 9, 2020):

There's a index parsing bug caused by xorm SQLite dialect. Maybe this issue will resolved after next xorm version is released.

@StdioA commented on GitHub (Jul 9, 2020): There's a [index parsing bug](https://gitea.com/xorm/xorm/pulls/1737) caused by xorm SQLite dialect. Maybe this issue will resolved after next xorm version is released.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5712