diff --git a/db/migrate/20240129140413_remove_obsolete_res7_repositories.rb b/db/migrate/20240129140413_remove_obsolete_res7_repositories.rb index 2dc1b14c1..687c69286 100644 --- a/db/migrate/20240129140413_remove_obsolete_res7_repositories.rb +++ b/db/migrate/20240129140413_remove_obsolete_res7_repositories.rb @@ -6,9 +6,13 @@ def change # This migration removes the now obsolete repositories, since RMT does # not remove these automatically. + # NOTE: We have a check in the repository model to stop users from + # deleting SUSE repositories. This is why need to run delete + # directly rather then destroying as usual. + # Affected repositories are: # - 1963: https://updates.suse.com/repo/$RCE/RES7/src/ # - 1736: https://updates.suse.com/repo/$RCE/RES7/x86_64/ - Repository.where(scc_id: [1963, 1736]).destroy_all + Repository.where(scc_id: [1963, 1736]).delete_all end end