summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 12:08:00 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 12:08:00 +0000
commit1a0d6dbdc2ac3047f4953a359ef27ba6e26074ae (patch)
treeddb78a8a0d1350dc767f049a21e0f7d37edaa82c /db
parentb11f7057d067885619ee3e513751f180b2e8ad85 (diff)
downloadgitlab-ce-1a0d6dbdc2ac3047f4953a359ef27ba6e26074ae.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20200330074719_add_index_for_group_vsm_usage_ping.rb18
-rw-r--r--db/structure.sql3
2 files changed, 21 insertions, 0 deletions
diff --git a/db/migrate/20200330074719_add_index_for_group_vsm_usage_ping.rb b/db/migrate/20200330074719_add_index_for_group_vsm_usage_ping.rb
new file mode 100644
index 00000000000..55ae2383d71
--- /dev/null
+++ b/db/migrate/20200330074719_add_index_for_group_vsm_usage_ping.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexForGroupVsmUsagePing < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+ INDEX_NAME = 'index_analytics_cycle_analytics_group_stages_custom_only'
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :analytics_cycle_analytics_group_stages, :id, where: 'custom = true', name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name :analytics_cycle_analytics_group_stages, INDEX_NAME
+ end
+end
diff --git a/db/structure.sql b/db/structure.sql
index 1a4b8582ab0..aa43d49b6dc 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -8520,6 +8520,8 @@ CREATE INDEX index_analytics_ca_project_stages_on_relative_position ON public.an
CREATE INDEX index_analytics_ca_project_stages_on_start_event_label_id ON public.analytics_cycle_analytics_project_stages USING btree (start_event_label_id);
+CREATE INDEX index_analytics_cycle_analytics_group_stages_custom_only ON public.analytics_cycle_analytics_group_stages USING btree (id) WHERE (custom = true);
+
CREATE INDEX index_application_settings_on_custom_project_templates_group_id ON public.application_settings USING btree (custom_project_templates_group_id);
CREATE INDEX index_application_settings_on_file_template_project_id ON public.application_settings USING btree (file_template_project_id);
@@ -12909,5 +12911,6 @@ COPY "schema_migrations" (version) FROM STDIN;
20200326135443
20200326144443
20200326145443
+20200330074719
\.