Remove Duplicated keys adding UNIQUE index to fingerprint
What does this MR do?
Add a unique index to the keys fingerprint column. We added three migrations:
- Remove duplicates we kept the last key.
- We remove the existing index only when exists (gitlab-ee)
- Add the unique index for gitlab-ce and gitlab-ee
Why was this MR needed?
To remove a slow query
What are the relevant issue numbers?
Does this MR meet the acceptance criteria?
-
CHANGELOG entry added [ ] Documentation created/updated[ ] API support added-
Tests [ ] Added for this feature/bug-
All builds are passing
-
Conform by the style guides -
Branch has no merge conflicts with master
(if you do - rebase it please) -
Squashed related commits together