Skip to content

Commit

Permalink
Merge pull request #1100 from SUSE/delete-no-destroy
Browse files Browse the repository at this point in the history
Run delete_all instead of destroy_all when removing old RES7 repositories
  • Loading branch information
felixsch authored Feb 26, 2024
2 parents 6990200 + 0d8aa41 commit 5e772c3
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 5e772c3

Please sign in to comment.