From c0f42c6d662b776777afbf79ba72d8e833b8de48 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 9 Jun 2021 15:10:05 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .../20210602122233_add_runners_description_index.rb | 17 +++++++++++++++++ db/schema_migrations/20210602122233 | 1 + db/structure.sql | 2 ++ 3 files changed, 20 insertions(+) create mode 100644 db/migrate/20210602122233_add_runners_description_index.rb create mode 100644 db/schema_migrations/20210602122233 (limited to 'db') diff --git a/db/migrate/20210602122233_add_runners_description_index.rb b/db/migrate/20210602122233_add_runners_description_index.rb new file mode 100644 index 00000000000..ae779e62f0f --- /dev/null +++ b/db/migrate/20210602122233_add_runners_description_index.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddRunnersDescriptionIndex < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + INDEX_NAME = 'index_ci_runners_on_description_trigram' + + disable_ddl_transaction! + + def up + add_concurrent_index :ci_runners, :description, name: INDEX_NAME, using: :gin, opclass: { description: :gin_trgm_ops } + end + + def down + remove_concurrent_index_by_name :ci_runners, INDEX_NAME + end +end diff --git a/db/schema_migrations/20210602122233 b/db/schema_migrations/20210602122233 new file mode 100644 index 00000000000..c52dbdfd858 --- /dev/null +++ b/db/schema_migrations/20210602122233 @@ -0,0 +1 @@ +96c70de2567fc3e816c720ed6e4cef2446c0f0ee288d0959cd1298523913077f \ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 9887ac3cdf5..5fa8419bd40 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -22921,6 +22921,8 @@ CREATE INDEX index_ci_runner_projects_on_runner_id ON ci_runner_projects USING b CREATE INDEX index_ci_runners_on_contacted_at ON ci_runners USING btree (contacted_at); +CREATE INDEX index_ci_runners_on_description_trigram ON ci_runners USING gin (description gin_trgm_ops); + CREATE INDEX index_ci_runners_on_locked ON ci_runners USING btree (locked); CREATE INDEX index_ci_runners_on_runner_type ON ci_runners USING btree (runner_type); -- cgit v1.2.3