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-02-08 00:08:39 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-08 00:08:39 +0300
commit0c6bc5443aa6c8f3e4becccb89fc0f135b4c64c8 (patch)
tree55f13e752e9061c1800cce510a52fc78b13282ca /db
parentd7ce7307dca551759ffa972015875f8ebe476927 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/fixtures/development/17_cycle_analytics.rb4
-rw-r--r--db/post_migrate/20200203104214_services_remove_temporary_index_on_project_id.rb22
-rw-r--r--db/schema.rb1
3 files changed, 24 insertions, 3 deletions
diff --git a/db/fixtures/development/17_cycle_analytics.rb b/db/fixtures/development/17_cycle_analytics.rb
index b2252d31cac..2bf3c918006 100644
--- a/db/fixtures/development/17_cycle_analytics.rb
+++ b/db/fixtures/development/17_cycle_analytics.rb
@@ -109,7 +109,7 @@ class Gitlab::Seeder::CycleAnalytics
def create_issues
Array.new(@issue_count) do
issue_params = {
- title: "Cycle Analytics: #{FFaker::Lorem.sentence(6)}",
+ title: "Value Stream Analytics: #{FFaker::Lorem.sentence(6)}",
description: FFaker::Lorem.sentence,
state: 'opened',
assignees: [@project.team.users.sample]
@@ -166,7 +166,7 @@ class Gitlab::Seeder::CycleAnalytics
Timecop.travel 12.hours.from_now
opts = {
- title: 'Cycle Analytics merge_request',
+ title: 'Value Stream Analytics merge_request',
description: "Fixes #{issue.to_reference}",
source_branch: branch,
target_branch: 'master'
diff --git a/db/post_migrate/20200203104214_services_remove_temporary_index_on_project_id.rb b/db/post_migrate/20200203104214_services_remove_temporary_index_on_project_id.rb
new file mode 100644
index 00000000000..c9566d0256c
--- /dev/null
+++ b/db/post_migrate/20200203104214_services_remove_temporary_index_on_project_id.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+# See http://doc.gitlab.com/ce/development/migration_style_guide.html
+# for more information on how to write migrations for GitLab.
+
+class ServicesRemoveTemporaryIndexOnProjectId < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+ INDEX_NAME = 'tmp_index_on_project_id_partial_with_prometheus_services'
+ PARTIAL_FILTER = "type = 'PrometheusService'"
+
+ disable_ddl_transaction!
+
+ def up
+ remove_concurrent_index :services, :project_id, where: PARTIAL_FILTER, name: INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index :services, :project_id, where: PARTIAL_FILTER, name: INDEX_NAME
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 8d08f7a9301..c76b08467fe 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -3846,7 +3846,6 @@ ActiveRecord::Schema.define(version: 2020_02_06_111847) do
t.boolean "instance", default: false
t.index ["instance"], name: "index_services_on_instance"
t.index ["project_id"], name: "index_services_on_project_id"
- t.index ["project_id"], name: "tmp_index_on_project_id_partial_with_prometheus_services", where: "((type)::text = 'PrometheusService'::text)"
t.index ["type"], name: "index_services_on_type"
end