FIX ci repos dependent destroy bug

This commit is contained in:
Jasder
2020-09-04 16:45:38 +08:00
parent 48350dc6f2
commit e0dac72114
2 changed files with 2 additions and 1 deletions

View File

@@ -2,7 +2,7 @@ class Ci::User < Ci::RemoteBase
self.primary_key = 'user_id'
has_many :repos, foreign_key: "repo_user_id", dependent: :destroy
has_many :perms, foreign_key: "perm_user_id", dependent: :destroy
has_many :perms, foreign_key: "perm_user_id", dependent: :delete_all
has_one :ci_cloud_account, class_name: 'Ci::CloudAccount', foreign_key: :ci_user_id
end