diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2017-07-03 19:14:54 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2017-07-03 19:14:54 +0000 |
commit | 65745f52833694f9fac956fb7e0c03233e646684 (patch) | |
tree | 8406a191bef0ca025434fcb8d23ae35b9054c986 /app/models | |
parent | fd72b4eda1f0d7d3591a6db8163633efaa3f1955 (diff) | |
parent | 1cecc285cfa7dfb3c34b34f07ab0b51c2a970bde (diff) | |
download | gitlab-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.rb | 2 |
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 |