diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-04-24 14:53:46 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-04-24 15:48:10 +0200 |
commit | c9dc51111d53aba4e456afaade4bf9ad82c4b28c (patch) | |
tree | de742fbd8de072005fef8a55f96c8092aca52ce1 /app/models | |
parent | d7e8bfac48e5b142348cd503f39387e9d88a3b85 (diff) | |
download | gitlab-ce-c9dc51111d53aba4e456afaade4bf9ad82c4b28c.tar.gz |
Rename stage index column name to priority column
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/ci/stage.rb | 6 |
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') |