@@ -26,19 +26,19 @@ def blank?
2626 ENVIRONMENT_MAX_SIZE = 50
2727 REQUIRED_HOOKS = %i( push status ) . freeze
2828
29- has_many :commits , dependent : :destroy
30- has_many :merge_requests , dependent : :destroy
31- has_many :tasks , dependent : :destroy
29+ has_many :commits , dependent : :delete_all
30+ has_many :merge_requests , dependent : :delete_all
31+ has_many :tasks , dependent : :delete_all
3232 has_many :deploys
3333 has_many :rollbacks
3434 has_many :deploys_and_rollbacks ,
3535 -> { where ( type : %w( Shipit::Deploy Shipit::Rollback ) ) } ,
3636 class_name : 'Task' ,
3737 inverse_of : :stack
38- has_many :github_hooks , dependent : :destroy , class_name : 'Shipit::GithubHook::Repo'
39- has_many :hooks , dependent : :destroy
40- has_many :api_clients , dependent : :destroy
41- has_one :continuous_delivery_schedule
38+ has_many :github_hooks , dependent : :delete_all , class_name : 'Shipit::GithubHook::Repo'
39+ has_many :hooks , dependent : :delete_all
40+ has_many :api_clients , dependent : :delete_all
41+ has_one :continuous_delivery_schedule , dependent : :delete_all
4242 belongs_to :lock_author , class_name : :User , optional : true
4343 belongs_to :repository
4444 validates_associated :repository
0 commit comments