Commit d016696d authored by Adrien Kohlbecker's avatar Adrien Kohlbecker Committed by Patrick Bair

Revert "squash!"

This reverts commit 102f1c8e97fdcd8dbca61b754219e83d33398482.
parent 0f690167
---
title: Adds id desc to index_ci_builds_on_runner_id_and_id_desc
merge_request: 48241
author:
type: fixed
# frozen_string_literal: true
class AddRunnerIdAndIdDescIndexToCiBuilds < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
NEW_INDEX = 'index_ci_builds_on_runner_id_and_id_desc'
OLD_INDEX = 'index_ci_builds_on_runner_id'
disable_ddl_transaction!
def up
add_concurrent_index :ci_builds, %i[runner_id id], name: NEW_INDEX, order: { id: :desc }
remove_concurrent_index_by_name :ci_builds, OLD_INDEX
end
def down
add_concurrent_index :ci_builds, %i[runner_id], name: OLD_INDEX
remove_concurrent_index_by_name :ci_builds, NEW_INDEX
end
end
6b88d79aa8d373fa1d9aa2698a9d20c09aff14ef16af4c123abd4e7c98e41311
\ No newline at end of file
......@@ -20479,7 +20479,7 @@ CREATE INDEX index_ci_builds_on_protected ON ci_builds USING btree (protected);
CREATE INDEX index_ci_builds_on_queued_at ON ci_builds USING btree (queued_at);
CREATE INDEX index_ci_builds_on_runner_id ON ci_builds USING btree (runner_id);
CREATE INDEX index_ci_builds_on_runner_id_and_id_desc ON ci_builds USING btree (runner_id, id DESC);
CREATE INDEX index_ci_builds_on_stage_id ON ci_builds USING btree (stage_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment