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

Add primary key to repo_topic table #8920

Closed
2 of 7 tasks
mihkelvain opened this issue Nov 11, 2019 · 2 comments · Fixed by #12639
Closed
2 of 7 tasks

Add primary key to repo_topic table #8920

mihkelvain opened this issue Nov 11, 2019 · 2 comments · Fixed by #12639
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@mihkelvain
Copy link

  • Git version: 1.9.5
  • Operating system: CentOS 7
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

In MySQL group replication, it is mandatory to that every table has primary key. Gitea schema has repo_topic table that does not have primary key. Please consider adding pk also to that table.
https://dev.mysql.com/doc/refman/8.0/en/group-replication-requirements.html

Currently gitea runs fine in group replicated mysql instance, but for obvious reasons I can't alter repo topics.

@lunny lunny added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Nov 11, 2019
@lafriks
Copy link
Member

lafriks commented Feb 3, 2020

UNIQUE index for that table could be easily replaced by composite PK

@zeripath
Copy link
Contributor

I suspect that this would require #12407 to recreate the tables with the primary key. SQLite certainly requires the tables to be recreated. Others would cause us to have to do constraint checking - recreating would certainly be simpler.

zeripath added a commit to zeripath/gitea that referenced this issue Sep 6, 2020
Add a primary key to Topic and RepoTopic tables

Fix go-gitea#8920

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added a commit that referenced this issue Sep 10, 2020
Add a primary key to Topic and RepoTopic tables

Fix #8920

Signed-off-by: Andrew Thornton <art27@cantab.net>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants