Skip to content

Cleanup draft column data polluted by leaky regex

In a prior, now reverted migration (!67687 (comment 649843625)), we attempted to populate the draft column based on the "draft" or "WIP" nature of the title, mirroring what is used in MergeRequest#draft?. However, an error in the SQL regexp caused us to grab an additional number of MRs and label them as "draft".

We need to introduce a migration that finds all MRs that

  1. are draft: true
  2. match the original "leaky" regexp
  3. do NOT match the new, "corrected" regexp

This should give us the set of MRs that were incorrectly modified. We then update them to draft: false