WIP: Add migration to cleanup internal_ids.
What does this MR do?
This MR deletes any records in internal_ids
that are inconsistent with respect to the maximum iid
we can find for the referenced scope.
This is not meant to be merged, a proper migration will be released in another MR.
Why was this MR needed?
https://gitlab.com/gitlab-org/gitlab-ce/issues/49446
What are the relevant issue numbers?
Edited by Andreas Brandl