Skip to content

Remove duplicated indexes in post migration

What does this MR do and why?

It generates migration to remove indexes as post migrations. It also removes the duplicated index from duplicate_indexes.yml file.

What does this MR do and why?

  • Remove indexes in post migrations
  • Remove the table and indexes entries from spec/support/helpers/database/duplicate_indexes.yml

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

  1. Checkout this branch

  2. Run bundle exec gitlab-housekeeper -k Keeps::RemoveDuplicatedIndexes -d -m 3

    • The -d just prints the contents of the merge request. Removing this will actually create merge requests and requires setting a few environment variables.
    • The -m option is the limit of MRs to create. Defaults to 1 if not set.
  1. Check the output

Related to #440213 (closed)

Edited by Leonardo da Rosa

Merge request reports