Invert `merge_requests_author_approval` to match similar fields
merge_requests_author_approval
is at odds with its natural partner merge_requests_disable_committers_approval
as well as with it's application_settings
cousins prevent_merge_requests_author_approval
and prevent_merge_requests_committers_approval
in that true
means "allow this action". This caused QUITE a bit of confusion in #324087 (closed). To fix this, we need to go through several steps:
- add a new column
merge_requests_disable_author_approval
- add a method to populate/change it when
merge_requests_author_approval
is changed - check for any existing indices that need to be reconstituted with the new field
- a background migration to backfill the new field for every single project
- alias
Project#merge_requests_author_approval
(or replace every call with the new attribute) - invert any logic
- drop
merge_requests_author_approval
and any associated indices
It's a lot of busy work, but not pressing at this point, I don't think.. actually, a really good Community contribution candidate (or for the hackathon)