Skip to content

Patch ActiveRecord CRUD actions for partitioning

Marius Bobin requested to merge mb-partch-rails-6-for-partitioning into master

What does this MR do and why?

This is extracted from https://gitlab.com/mbobin/investigate-377940/-/blob/main/rails.rb to allow update/destroy actions to use the partition_id filter for SQL queries.

I think it's better to have it in the GitLab codebase than as a separate gem because there are a lot of other gems here and things that modify ActiveRecord so we might get some unintended behavior from a gem.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Marius Bobin

Merge request reports