summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2017-07-03 19:14:54 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2017-07-03 19:14:54 +0000
commit65745f52833694f9fac956fb7e0c03233e646684 (patch)
tree8406a191bef0ca025434fcb8d23ae35b9054c986 /app/models
parentfd72b4eda1f0d7d3591a6db8163633efaa3f1955 (diff)
parent1cecc285cfa7dfb3c34b34f07ab0b51c2a970bde (diff)
downloadgitlab-ce-65745f52833694f9fac956fb7e0c03233e646684.tar.gz
Merge branch 'add-ci_variables-environment_scope' into 'master'
Add environment_scope column to ci_variables table See merge request !12363
Diffstat (limited to 'app/models')
-rw-r--r--app/models/ci/variable.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/ci/variable.rb b/app/models/ci/variable.rb
index 96d6e120998..0b8d0ff881a 100644
--- a/app/models/ci/variable.rb
+++ b/app/models/ci/variable.rb
@@ -5,7 +5,7 @@ module Ci
belongs_to :project
- validates :key, uniqueness: { scope: :project_id }
+ validates :key, uniqueness: { scope: [:project_id, :environment_scope] }
scope :unprotected, -> { where(protected: false) }
end