Commit 521a0501 authored by Giorgenes Gelatti's avatar Giorgenes Gelatti Committed by Toon Claes

Adds pkg index on (id,created_at)

parent 0d15c12f
# frozen_string_literal: true
class AddIdCreatedAtIndexToPackages < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
INDEX_NAME = 'index_packages_packages_on_id_and_created_at'
def up
add_concurrent_index :packages_packages, [:id, :created_at], name: INDEX_NAME
end
def down
remove_concurrent_index_by_name(:packages_packages, INDEX_NAME)
end
end
eb13fb285ac9af83bbc66397a5352a824575ad4af93178b98fbfc1be2e11ce8b
\ No newline at end of file
......@@ -20463,6 +20463,8 @@ CREATE INDEX index_packages_package_files_on_package_id_and_file_name ON public.
CREATE INDEX index_packages_packages_on_creator_id ON public.packages_packages USING btree (creator_id);
CREATE INDEX index_packages_packages_on_id_and_created_at ON public.packages_packages USING btree (id, created_at);
CREATE INDEX index_packages_packages_on_name_trigram ON public.packages_packages USING gin (name public.gin_trgm_ops);
CREATE INDEX index_packages_packages_on_project_id_and_created_at ON public.packages_packages USING btree (project_id, created_at);
......
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