summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-04-24 14:53:46 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-04-24 15:48:10 +0200
commitc9dc51111d53aba4e456afaade4bf9ad82c4b28c (patch)
treede742fbd8de072005fef8a55f96c8092aca52ce1 /app/models
parentd7e8bfac48e5b142348cd503f39387e9d88a3b85 (diff)
downloadgitlab-ce-c9dc51111d53aba4e456afaade4bf9ad82c4b28c.tar.gz
Rename stage index column name to priority column
Diffstat (limited to 'app/models')
-rw-r--r--app/models/ci/stage.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/ci/stage.rb b/app/models/ci/stage.rb
index 5a77a909b9d..9a913213bb9 100644
--- a/app/models/ci/stage.rb
+++ b/app/models/ci/stage.rb
@@ -17,7 +17,7 @@ module Ci
validates :project, presence: true
validates :pipeline, presence: true
validates :name, presence: true
- validates :index, presence: true
+ validates :priority, presence: true
end
after_initialize do
@@ -25,9 +25,9 @@ module Ci
end
before_validation unless: :importing? do
- next if index.present?
+ next if priority.present?
- self.index = statuses.select(:stage_idx)
+ self.priority = statuses.select(:stage_idx)
.where('stage_idx IS NOT NULL')
.group(:stage_idx)
.order('COUNT(*) DESC')