From 962bf01e69add14bceb3a901a143fcfba486abf3 Mon Sep 17 00:00:00 2001 From: "Z.J. van de Weg" Date: Fri, 7 Apr 2017 15:56:08 +0200 Subject: Add foreign key on trigger requests I started out as I missed the foreign key on ci_triggers and projects. However, it seemed Yorick caught this already on gitlab-org/gitlab-ce!9388. Still I found a missing foreign key, between the trigger requests and triggers. This commit adds it, and removes the depend: :destroy on the Rails model Ci::Triggers --- app/models/ci/trigger.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/ci/trigger.rb') diff --git a/app/models/ci/trigger.rb b/app/models/ci/trigger.rb index b59e235c425..2f64f70685a 100644 --- a/app/models/ci/trigger.rb +++ b/app/models/ci/trigger.rb @@ -7,7 +7,7 @@ module Ci belongs_to :project belongs_to :owner, class_name: "User" - has_many :trigger_requests, dependent: :destroy + has_many :trigger_requests has_one :trigger_schedule, dependent: :destroy validates :token, presence: true, uniqueness: true -- cgit v1.2.1