summaryrefslogtreecommitdiff
path: root/lib/gitlab/background_migration
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 /lib/gitlab/background_migration
parentd7e8bfac48e5b142348cd503f39387e9d88a3b85 (diff)
downloadgitlab-ce-c9dc51111d53aba4e456afaade4bf9ad82c4b28c.tar.gz
Rename stage index column name to priority column
Diffstat (limited to 'lib/gitlab/background_migration')
-rw-r--r--lib/gitlab/background_migration/migrate_stage_index.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/background_migration/migrate_stage_index.rb b/lib/gitlab/background_migration/migrate_stage_index.rb
index 9ba3d7eb455..140c75054df 100644
--- a/lib/gitlab/background_migration/migrate_stage_index.rb
+++ b/lib/gitlab/background_migration/migrate_stage_index.rb
@@ -26,19 +26,19 @@ module Gitlab
FROM freqs
)
- UPDATE ci_stages SET index = indexes.index
+ UPDATE ci_stages SET priority = indexes.index
FROM indexes WHERE indexes.stage_id = ci_stages.id
- AND ci_stages.index IS NULL;
+ AND ci_stages.priority IS NULL;
SQL
else
<<~SQL
UPDATE ci_stages
- SET index =
+ SET priority =
(SELECT stage_idx FROM ci_builds
WHERE ci_builds.stage_id = ci_stages.id
GROUP BY ci_builds.stage_idx ORDER BY COUNT(*) DESC LIMIT 1)
WHERE ci_stages.id BETWEEN #{start_id} AND #{stop_id}
- AND ci_stages.index IS NULL
+ AND ci_stages.priority IS NULL
SQL
end
end