Drop unused project_push_rules table
What does this MR do and why?
Drops the unused project_push_rules table with a post-deployment migration:
- removes the
fk_9ed8a48c44foreign key toprojects, then drops the table - moves
db/docs/project_push_rules.ymltodb/docs/deleted_tables/withremoved_by_url/removed_in_milestone
Background
As part of the Cells 1.0 initiative, the push_rules table was going to be split so each entity type (organization, group, project) had its own dedicated table (#499156). The project_push_rules table was created in %18.6 for this purpose, and data was backfilled from push_rules via background migrations and kept in sync with database triggers.
That approach was later scrapped for project push rules: instead of moving reads to the new table, push_rules itself is being made the dedicated, Cells-compatible project table (project_id NOT NULL constraint added in #605242 (closed), sharding key declared in #605245 (closed)). The read switch to project_push_rules was reverted in #592187 (closed) before it was ever fully enabled, which left the table written but never read.
Since then the table has been fully decommissioned:
- the sync triggers between
push_rulesandproject_push_ruleswere dropped in %19.1 (#588979 (closed)), so nothing writes to it anymore - all three related batched background migrations (
MigrateDuplicatePushRulesToProjectPushRules,MigrateNonDuplicatePushRulesToProjectPushRules,BackfillMissingProjectPushRules) are finalized (finalized_byset in their dictionary files) - the
ProjectPushRulemodel and its finder are removed in !250396 (merged) and !250399 (merged)
Dropping the table is the final step. Historical migration and BBM files are intentionally kept, per the migration guidelines.
This is the third of the small cleanup MRs for #605248 (closed), stacked on !250399 (merged) (targets its branch; will be retargeted to master once it merges).
References
- Issue: #605248 (closed)
- Parent tracking issue: #499156
- Read switch revert: #592187 (closed)
- Previous cleanup MRs: !250396 (merged), !250399 (merged)
Migration output
Up
sec: == 20260817104814 DropProjectPushRulesTable: migrating ========================
sec: -- execute("LOCK TABLE projects, project_push_rules IN ACCESS EXCLUSIVE MODE")
sec: -> 0.0011s
sec: -- remove_foreign_key(:project_push_rules, :projects, {:column=>:project_id, :name=>:fk_9ed8a48c44})
sec: -> 0.0049s
sec: -- drop_table(:project_push_rules, {:if_exists=>true})
sec: -> 0.0104s
sec: == 20260817104814 DropProjectPushRulesTable: migrated (0.0950s) ===============Down
main: -- execute("ALTER TABLE project_push_rules VALIDATE CONSTRAINT fk_9ed8a48c44;")
main: -> 0.0119s
main: == 20260817104814 DropProjectPushRulesTable: reverted (0.1521s) ===============MR acceptance checklist
Evaluate this MR against the MR acceptance checklist.
Changelog: removed