Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-04-14 18:09:04 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-04-14 18:09:04 +0300
commita3dfd311f4660fc81e929058abd6e136ac884ed3 (patch)
tree4d7087cac6e2ca89df3adea98f92b9eddffa7790 /db
parent7f408a3831590a1f98a1e1a04b63acba8937e36b (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20210413123832_add_index_on_web_hook_id_to_partitioned_web_hook_log.rb21
-rw-r--r--db/migrate/20210414095944_add_index_services_on_project_and_type_where_inherit_null.rb17
-rw-r--r--db/schema_migrations/202104131238321
-rw-r--r--db/schema_migrations/202104140959441
-rw-r--r--db/structure.sql4
5 files changed, 44 insertions, 0 deletions
diff --git a/db/migrate/20210413123832_add_index_on_web_hook_id_to_partitioned_web_hook_log.rb b/db/migrate/20210413123832_add_index_on_web_hook_id_to_partitioned_web_hook_log.rb
new file mode 100644
index 00000000000..300c19d3e51
--- /dev/null
+++ b/db/migrate/20210413123832_add_index_on_web_hook_id_to_partitioned_web_hook_log.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class AddIndexOnWebHookIdToPartitionedWebHookLog < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::PartitioningMigrationHelpers
+
+ DOWNTIME = false
+
+ WEB_HOOK_ID_INDEX_NAME = 'index_web_hook_logs_part_on_web_hook_id'
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_partitioned_index :web_hook_logs_part_0c5294f417,
+ :web_hook_id,
+ name: WEB_HOOK_ID_INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_partitioned_index_by_name :web_hook_logs_part_0c5294f417, WEB_HOOK_ID_INDEX_NAME
+ end
+end
diff --git a/db/migrate/20210414095944_add_index_services_on_project_and_type_where_inherit_null.rb b/db/migrate/20210414095944_add_index_services_on_project_and_type_where_inherit_null.rb
new file mode 100644
index 00000000000..395742318e2
--- /dev/null
+++ b/db/migrate/20210414095944_add_index_services_on_project_and_type_where_inherit_null.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddIndexServicesOnProjectAndTypeWhereInheritNull < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'index_services_on_project_and_type_where_inherit_null'
+
+ def up
+ add_concurrent_index(:services, [:project_id, :type], where: 'inherit_from_id IS NULL', name: INDEX_NAME)
+ end
+
+ def down
+ remove_concurrent_index_by_name(:services, INDEX_NAME)
+ end
+end
diff --git a/db/schema_migrations/20210413123832 b/db/schema_migrations/20210413123832
new file mode 100644
index 00000000000..4a8af15f336
--- /dev/null
+++ b/db/schema_migrations/20210413123832
@@ -0,0 +1 @@
+d166250305c2939bea8cc1970faf50d86776d32270a80a429cce668a97280aad \ No newline at end of file
diff --git a/db/schema_migrations/20210414095944 b/db/schema_migrations/20210414095944
new file mode 100644
index 00000000000..67abfa19822
--- /dev/null
+++ b/db/schema_migrations/20210414095944
@@ -0,0 +1 @@
+843d9eabf8b67fe10d9eb453e887032d5b88b8594ae666bc6c6ac81e20e1ab53 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 5d0ca31e91f..74a30a2b691 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -23864,6 +23864,8 @@ CREATE INDEX index_service_desk_enabled_projects_on_id_creator_id_created_at ON
CREATE INDEX index_services_on_inherit_from_id ON services USING btree (inherit_from_id);
+CREATE INDEX index_services_on_project_and_type_where_inherit_null ON services USING btree (project_id, type) WHERE (inherit_from_id IS NULL);
+
CREATE UNIQUE INDEX index_services_on_project_id_and_type_unique ON services USING btree (project_id, type);
CREATE INDEX index_services_on_template ON services USING btree (template);
@@ -24258,6 +24260,8 @@ CREATE INDEX index_web_hook_logs_on_created_at_and_web_hook_id ON web_hook_logs
CREATE INDEX index_web_hook_logs_on_web_hook_id ON web_hook_logs USING btree (web_hook_id);
+CREATE INDEX index_web_hook_logs_part_on_web_hook_id ON ONLY web_hook_logs_part_0c5294f417 USING btree (web_hook_id);
+
CREATE INDEX index_web_hooks_on_group_id ON web_hooks USING btree (group_id) WHERE ((type)::text = 'GroupHook'::text);
CREATE INDEX index_web_hooks_on_project_id ON web_hooks USING btree (project_id);