diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-04 00:09:57 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-04 00:09:57 +0300 |
commit | b8fcc8edb4a289ef3ef4fee0ed8fd88e853a2396 (patch) | |
tree | 31658d7760d36aa3b368e020e08f4d21c678f2e3 /app/models/project.rb | |
parent | d83bbccfcd07ddab93be73959e3b149b75831e28 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 88cecc4770d..aca61f645da 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -236,6 +236,9 @@ class Project < ApplicationRecord # Packages has_many :packages, class_name: 'Packages::Package' has_many :package_files, through: :packages, class_name: 'Packages::PackageFile' + # repository_files must be destroyed by ruby code in order to properly remove carrierwave uploads + has_many :repository_files, inverse_of: :project, class_name: 'Packages::Rpm::RepositoryFile', + dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent # debian_distributions and associated component_files must be destroyed by ruby code in order to properly remove carrierwave uploads has_many :debian_distributions, class_name: 'Packages::Debian::ProjectDistribution', dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent has_one :packages_cleanup_policy, class_name: 'Packages::Cleanup::Policy', inverse_of: :project |