summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-10 06:09:14 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-10 06:09:14 +0000
commit2aaef94c80937d9d188f7b9cbbad2dcd1508c3c1 (patch)
treec343aaac388d95b5562c3697058d13357582b190 /db
parentac8913be389e870c3d2bc556a38ae65cd59389af (diff)
downloadgitlab-ce-2aaef94c80937d9d188f7b9cbbad2dcd1508c3c1.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20200204070729_add_elasticsearch_indexed_field_length_limit_to_application_settings.rb17
-rw-r--r--db/schema.rb1
2 files changed, 18 insertions, 0 deletions
diff --git a/db/migrate/20200204070729_add_elasticsearch_indexed_field_length_limit_to_application_settings.rb b/db/migrate/20200204070729_add_elasticsearch_indexed_field_length_limit_to_application_settings.rb
new file mode 100644
index 00000000000..7d478706613
--- /dev/null
+++ b/db/migrate/20200204070729_add_elasticsearch_indexed_field_length_limit_to_application_settings.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddElasticsearchIndexedFieldLengthLimitToApplicationSettings < ActiveRecord::Migration[6.0]
+ DOWNTIME = false
+
+ def up
+ add_column :application_settings, :elasticsearch_indexed_field_length_limit, :integer, null: false, default: 0
+
+ if Gitlab.com?
+ execute 'UPDATE application_settings SET elasticsearch_indexed_field_length_limit = 20000'
+ end
+ end
+
+ def down
+ remove_column :application_settings, :elasticsearch_indexed_field_length_limit
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index c76b08467fe..a432e449951 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -343,6 +343,7 @@ ActiveRecord::Schema.define(version: 2020_02_06_111847) do
t.boolean "force_pages_access_control", default: false, null: false
t.boolean "updating_name_disabled_for_users", default: false, null: false
t.integer "instance_administrators_group_id"
+ t.integer "elasticsearch_indexed_field_length_limit", default: 0, null: false
t.index ["custom_project_templates_group_id"], name: "index_application_settings_on_custom_project_templates_group_id"
t.index ["file_template_project_id"], name: "index_application_settings_on_file_template_project_id"
t.index ["instance_administration_project_id"], name: "index_applicationsettings_on_instance_administration_project_id"