Add primary_key to issue_index (#16813) #16820

Merged
lunny merged 2 commits from backport-16813-v1.15 into release/v1.15 2021-08-25 22:10:16 +00:00
Contributor

Backport #16813

Make the group_id a primary key in issue_index. This already has an
unique index and therefore is a good candidate for becoming a primary
key.

This PR also changes all other uses of this table to add the group_id as
the primary key.

The migration v192 from #16813 has not been backported but Xorm will
work fine with non-primary keyed tables. If a user on 1.15 wishes to
have the correct schema sooner than 1.16 - they can use gitea doctor recreate-table issue_index and gitea will recreate the table with the
primary key.

Fix #16802

Signed-off-by: Andrew Thornton art27@cantab.net

Backport #16813 Make the group_id a primary key in issue_index. This already has an unique index and therefore is a good candidate for becoming a primary key. This PR also changes all other uses of this table to add the group_id as the primary key. The migration v192 from #16813 has not been backported but Xorm will work fine with non-primary keyed tables. If a user on 1.15 wishes to have the correct schema sooner than 1.16 - they can use `gitea doctor recreate-table issue_index` and gitea will recreate the table with the primary key. Fix #16802 Signed-off-by: Andrew Thornton art27@cantab.net
KN4CK3R (Migrated from github.com) approved these changes 2021-08-25 10:32:00 +00:00
techknowlogick approved these changes 2021-08-25 22:10:04 +00:00
This repo is archived. You cannot comment on pull requests.
No Milestone
No project
No Assignees
3 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: lunny/gitea#16820
No description provided.