summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-09 21:09:19 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-09 21:09:19 +0000
commit254ec28f5448f6f353cd98f637985de3d1405854 (patch)
tree1c84ed7b7dd32db96454af034cd6c7e90699e76d /db
parent141902c04943d5fb43c014b8cf42af60a3bc0cdf (diff)
downloadgitlab-ce-254ec28f5448f6f353cd98f637985de3d1405854.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20200406135648_add_index_to_created_at_on_resource_milestone_events.rb19
-rw-r--r--db/post_migrate/20200408110856_add_nginx_five_hundred_percentage_metric.rb13
-rw-r--r--db/structure.sql4
3 files changed, 36 insertions, 0 deletions
diff --git a/db/migrate/20200406135648_add_index_to_created_at_on_resource_milestone_events.rb b/db/migrate/20200406135648_add_index_to_created_at_on_resource_milestone_events.rb
new file mode 100644
index 00000000000..6b8b981990d
--- /dev/null
+++ b/db/migrate/20200406135648_add_index_to_created_at_on_resource_milestone_events.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class AddIndexToCreatedAtOnResourceMilestoneEvents < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ INDEX_NAME = 'index_resource_milestone_events_created_at'
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :resource_milestone_events, :created_at, name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name :resource_milestone_events, INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20200408110856_add_nginx_five_hundred_percentage_metric.rb b/db/post_migrate/20200408110856_add_nginx_five_hundred_percentage_metric.rb
new file mode 100644
index 00000000000..a99e0291fe8
--- /dev/null
+++ b/db/post_migrate/20200408110856_add_nginx_five_hundred_percentage_metric.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class AddNginxFiveHundredPercentageMetric < ActiveRecord::Migration[6.0]
+ DOWNTIME = false
+
+ def up
+ ::Gitlab::DatabaseImporters::CommonMetrics::Importer.new.execute
+ end
+
+ def down
+ # no-op
+ end
+end
diff --git a/db/structure.sql b/db/structure.sql
index d179c52ee6b..3faa5499f6c 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -10036,6 +10036,8 @@ CREATE INDEX index_resource_label_events_on_merge_request_id ON public.resource_
CREATE INDEX index_resource_label_events_on_user_id ON public.resource_label_events USING btree (user_id);
+CREATE INDEX index_resource_milestone_events_created_at ON public.resource_milestone_events USING btree (created_at);
+
CREATE INDEX index_resource_milestone_events_on_issue_id ON public.resource_milestone_events USING btree (issue_id);
CREATE INDEX index_resource_milestone_events_on_merge_request_id ON public.resource_milestone_events USING btree (merge_request_id);
@@ -13070,7 +13072,9 @@ COPY "schema_migrations" (version) FROM STDIN;
20200403184110
20200403185127
20200403185422
+20200406135648
20200407094005
20200407094923
+20200408110856
\.