Cleanup leftovers in packages_dependencies table
Compare changes
Files
9+ 14
− 0
@@ -9,6 +11,7 @@ class Packages::Dependency < ApplicationRecord
@@ -41,6 +44,17 @@ def self.pluck_ids_and_names
MR !20549 (merged) added two tables: packages_dependencies
and packages_dependency_links
. When a package is deleted, packages_dependency_links
rows are properly deleted but rows in packages_dependencies
are kept and they can become orphans. This MR aims to clean up those orphaned packages_dependencies
records.
packages_dependencies
records: FactoryBot.create_list(:packages_dependency, 100)
Feature.enable(:packages_delete_orphaned_dependencies_worker)
Packages::Cleanup::DeleteOrphanedDependenciesWorker.perform_async
, the orphaned records should be deleted.This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #38266 (closed)