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>2020-03-13 21:09:39 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-13 21:09:39 +0300
commit00fa950a34b1c94617110b150b8b2517d5241249 (patch)
tree8f2d8683879079da8f520f7867ebd49b8beaadef /db
parentc36152ff8c41fad2f413f253eb7ac5c927e47c56 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20200312163407_add_index_on_id_and_service_desk_enabled_to_projects.rb18
-rw-r--r--db/schema.rb3
2 files changed, 20 insertions, 1 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
diff --git a/db/schema.rb b/db/schema.rb
index a9dcfa50d33..f57b0638e05 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 2020_03_11_165635) do
+ActiveRecord::Schema.define(version: 2020_03_12_163407) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_trgm"
@@ -3491,6 +3491,7 @@ ActiveRecord::Schema.define(version: 2020_03_11_165635) do
t.index ["id", "repository_storage", "last_repository_updated_at"], name: "idx_projects_on_repository_storage_last_repository_updated_at"
t.index ["id"], name: "index_on_id_partial_with_legacy_storage", where: "((storage_version < 2) OR (storage_version IS NULL))"
t.index ["id"], name: "index_projects_on_id_partial_for_visibility", unique: true, where: "(visibility_level = ANY (ARRAY[10, 20]))"
+ t.index ["id"], name: "index_projects_on_id_service_desk_enabled", where: "(service_desk_enabled = true)"
t.index ["id"], name: "index_projects_on_mirror_and_mirror_trigger_builds_both_true", where: "((mirror IS TRUE) AND (mirror_trigger_builds IS TRUE))"
t.index ["last_activity_at", "id"], name: "index_projects_api_last_activity_at_id_desc", order: { id: :desc }
t.index ["last_activity_at", "id"], name: "index_projects_api_vis20_last_activity_at", where: "(visibility_level = 20)"