gitea: Error 500 creating a PR
- Gitea version (or commit ref): v1.15.1 (docker image from docker hub)
- Git version: N/A
- Operating system: debian 10
- Database (use
[x]):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
- No
- Log :
2021/09/02 22:52:16 ...ervices/pull/pull.go:39:NewPullRequest() [I] [SQL] BEGIN TRANSACTION [] - 355.924µs
2021/09/02 22:52:16 models/index.go:92:getNextResourceIndex() [I] [SQL] SELECT max_index FROM issue_index WHERE
group_id = $1 [1] - 485.227µs
2021/09/02 22:52:16 models/index.go:66:GetNextResourceIndex() [I] [SQL] INSERT INTO issue_index (group_id, max_index) VALUES ($1,1) ON CONFLICT (group_id) DO UPDATE SET max_index = issue_index.max_index+1 [1] - 551.813µs
2021/09/02 22:52:16 models/pull.go:431:NewPullRequest() [I] [SQL] ROLLBACK [] - 107.085µs
2021/09/02 22:52:16 ...ers/web/repo/pull.go:1113:CompareAndPullRequestPost() [E] NewPullRequest: generate issue
index failed: pq: there is no unique or exclusion constraint matching the ON CONFLICT specification
Description
- Created a branch locally
git checkout -b upgrade/mybranch
- Pushed branch to gitea
git push origin upgrade/mybranch
- On Gitea web app: create PR; error 500 occurs when committing the PR (clicking “Create Pull Request” button)
On a gitea running in docker; 1.15.0 used to work fine, but v1.15.1 does not.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 16 (8 by maintainers)
Commits related to this issue
- Add unique constraint back into issue_index There is a flaw in #16820 where it was missed that although xorm will not add a primary key to a table during syncing, it will remove an unique constraint.... — committed to zeripath/gitea by zeripath 3 years ago
- Add unique constraint back into issue_index (#16938) There is a flaw in #16820 where it was missed that although xorm will not add a primary key to a table during syncing, it will remove an unique ... — committed to go-gitea/gitea by zeripath 3 years ago
Just ran into this issue as well, running
gitea doctor recreate-table issue_indexfixed it for us - thanks!gitea doctor recreate-table issue_indexSimilarly what happens if you run
gitea doctor recreate-table issue_indexon 1.15.1?