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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-13 21:09:39 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-13 21:09:39 +0300
commit00fa950a34b1c94617110b150b8b2517d5241249 (patch)
tree8f2d8683879079da8f520f7867ebd49b8beaadef /db/migrate/20200312163407_add_index_on_id_and_service_desk_enabled_to_projects.rb
parentc36152ff8c41fad2f413f253eb7ac5c927e47c56 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate/20200312163407_add_index_on_id_and_service_desk_enabled_to_projects.rb')
-rw-r--r--db/migrate/20200312163407_add_index_on_id_and_service_desk_enabled_to_projects.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/db/migrate/20200312163407_add_index_on_id_and_service_desk_enabled_to_projects.rb b/db/migrate/20200312163407_add_index_on_id_and_service_desk_enabled_to_projects.rb
new file mode 100644
index 00000000000..903bd12ddf4
--- /dev/null
+++ b/db/migrate/20200312163407_add_index_on_id_and_service_desk_enabled_to_projects.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddIndexOnIdAndServiceDeskEnabledToProjects < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+ INDEX_NAME = 'index_projects_on_id_service_desk_enabled'
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :projects, :id, where: 'service_desk_enabled = true', name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name :projects, INDEX_NAME
+ end
+end