Skip to content
Snippets Groups Projects
Commit 910f8661 authored by Max Orefice's avatar Max Orefice :three:
Browse files

Merge branch 'morefice/drop-unused-ci-builds-index-2' into 'master'

Drop unused ci builds index

See merge request !91470
parents 47c8b113 adf17ace
No related branches found
No related tags found
No related merge requests found
Pipeline #587407477 passed
# frozen_string_literal: true
class DropProjectSuccessfullPagesDeployIndexFromCiBuilds < Gitlab::Database::Migration[2.0]
disable_ddl_transaction!
INDEX_NAME = 'index_ci_builds_on_project_id_for_successfull_pages_deploy'
def up
remove_concurrent_index_by_name :ci_builds, INDEX_NAME
end
# rubocop:disable Migration/PreventIndexCreation
def down
add_concurrent_index :ci_builds,
:project_id,
where: "(((type)::text = 'GenericCommitStatus'::text) AND ((stage)::text = 'deploy'::text) AND " \
"((name)::text = 'pages:deploy'::text) AND ((status)::text = 'success'::text))",
name: INDEX_NAME
end
# rubocop:enable Migration/PreventIndexCreation
end
c1fb356eb437f9511c0af324f9f4a173245a427d20e2bbda0557dfaff28911c3
\ No newline at end of file
......@@ -27492,8 +27492,6 @@ CREATE INDEX index_ci_builds_on_project_id_and_id ON ci_builds USING btree (proj
 
CREATE INDEX index_ci_builds_on_project_id_and_name_and_ref ON ci_builds USING btree (project_id, name, ref) WHERE (((type)::text = 'Ci::Build'::text) AND ((status)::text = 'success'::text) AND ((retried = false) OR (retried IS NULL)));
 
CREATE INDEX index_ci_builds_on_project_id_for_successfull_pages_deploy ON ci_builds USING btree (project_id) WHERE (((type)::text = 'GenericCommitStatus'::text) AND ((stage)::text = 'deploy'::text) AND ((name)::text = 'pages:deploy'::text) AND ((status)::text = 'success'::text));
CREATE INDEX index_ci_builds_on_queued_at ON ci_builds USING btree (queued_at);
 
CREATE INDEX index_ci_builds_on_resource_group_and_status_and_commit_id ON ci_builds USING btree (resource_group_id, status, commit_id) WHERE (resource_group_id IS NOT NULL);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment