Remove PushRule's project association
Problem to solve
It seems that originally each PushRule
always belonged to a single Project
(f6c20b7b; this was back in 2014 when PushRule
was called GitHook
). Later it seems that PushRule
was introduced at the Instance level. After Project and Instance level, PushRule
was introduced at the Group level under #34370 (closed). That prompted preliminary refactoring of the Project and Instance levels in !28286 (merged) (which added push_rule_id
at the Project and Instance levels). Then it prompted the actual change in !29144 (merged), which added push_rule_id
at the Group level. Now there is clearly no need for the push_rules#project_id
column. Apparently it was temporarily preserved for the sake of a background migration.
Proposal
Remove the PushRule#project
association and the underlying push_rules#project_id
column.
Column Removal Steps
-
Unpick usage of PushRule#project_id
from various parts of codebase -
Ignore column -
Drop column -
Remove ignore statement