Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unique Constraint error when renaming a branch #30428

Closed
sebastian-sauer opened this issue Apr 12, 2024 · 0 comments · Fixed by #30430
Closed

Unique Constraint error when renaming a branch #30428

sebastian-sauer opened this issue Apr 12, 2024 · 0 comments · Fixed by #30430
Labels
Milestone

Comments

@sebastian-sauer
Copy link
Contributor

Description

When renaming a branch to a branch name that was deleted before, a 500 error occurs with

An error occurred: RenameBranch, Error 1062 (23000): Duplicate entry '2118-Test123' for key 'UQE_branch_s'

Steps to reproduce

  • In an existing repo:
  • create a branch called Test123
  • create a second branch called Test234
  • Delete the branch Test123
  • Rename (via web ui) the branch Test234 to Test123

--> Error 500 with above mentioned error.

Gitea Version

1.21.10

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Binary from downloads

Database

None

@lunny lunny added this to the 1.21.11 milestone Apr 12, 2024
lunny added a commit that referenced this issue Apr 12, 2024
…database (#30430) (#30438)

Backport #30430 by @lunny

Fix #30428

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
lunny added a commit that referenced this issue Apr 12, 2024
…database (#30430) (#30437)

Backport #30430 by @lunny

Fix #30428

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
DennisRasey pushed a commit to DennisRasey/forgejo that referenced this issue Apr 15, 2024
…eleted but exist in database

Fix go-gitea/gitea#30428

---

Conflict resolution: trivial and move test to own subtest run directly
after `Normal`.

(cherrypicked commit 9466fec879f4f2c88c7c1e7a5cffba319282ab66)

(cherry picked from commit db39b8f)
DennisRasey pushed a commit to DennisRasey/forgejo that referenced this issue Apr 15, 2024
…eleted but exist in database

Fix go-gitea/gitea#30428

---

Conflict resolution: trivial and move test to own subtest run directly
after `Normal`.

(cherrypicked commit 9466fec879f4f2c88c7c1e7a5cffba319282ab66)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jul 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants