Rails5 fix AddMilestoneToLists migration rollback deleting wrong foreign key
What does this MR do?
Fix for AddMilestoneToLists
reverse migration that didn't work correctly on Rails 5. The reverse(remove_reference
) doesn't pass reference_name
to remove_foreign_key
when the foreign_key
argument is a hash. See https://github.com/rails/rails/blob/2e824afc06011d5f75a7c964be007589771c89a5/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#L845.
Fix is simply a separate down where we pass foreign_key: true
which will pass the reference_name
to remove_foreign_key
.
Broken jobs in scheduled Rails 5 pipeline: https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/87941148 https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/87940751 https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/87941203 https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/87941253 https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/87941053 ...
What are the relevant issue numbers?
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
EE specific content should be in the top level /ee
folder -
For a paid feature, have we considered GitLab.com plans, how it works for groups, and is there a design for promoting it to users who aren't on the correct plan?