diff options
author | Nick Thomas <nick@gitlab.com> | 2019-05-15 15:22:07 +0100 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-05-16 15:25:02 +0100 |
commit | 841ea50be449a77725f01d0351e579515538e7ed (patch) | |
tree | cabaa6983eb026d59e8cada123aa4ae6c22ba1b1 /db | |
parent | e5d2e7e677455ed620652e3a641718f6984a0b37 (diff) | |
download | gitlab-ce-841ea50be449a77725f01d0351e579515538e7ed.tar.gz |
CE backport of "Configure the number of ES shards and replicas"
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20190515125613_add_application_settings_elasticsearch_shards.rb | 10 | ||||
-rw-r--r-- | db/schema.rb | 4 |
2 files changed, 13 insertions, 1 deletions
diff --git a/db/migrate/20190515125613_add_application_settings_elasticsearch_shards.rb b/db/migrate/20190515125613_add_application_settings_elasticsearch_shards.rb new file mode 100644 index 00000000000..9cebc0f8db4 --- /dev/null +++ b/db/migrate/20190515125613_add_application_settings_elasticsearch_shards.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +class AddApplicationSettingsElasticsearchShards < ActiveRecord::Migration[5.1] + DOWNTIME = false + + def change + add_column :application_settings, :elasticsearch_shards, :integer, null: false, default: 5 + add_column :application_settings, :elasticsearch_replicas, :integer, null: false, default: 1 + end +end diff --git a/db/schema.rb b/db/schema.rb index 159e7e03cf4..9d367938cec 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: 20190506135400) do +ActiveRecord::Schema.define(version: 20190515125613) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -189,6 +189,8 @@ ActiveRecord::Schema.define(version: 20190506135400) do t.string "encrypted_external_auth_client_key_pass_iv" t.string "lets_encrypt_notification_email" t.boolean "lets_encrypt_terms_of_service_accepted", default: false, null: false + t.integer "elasticsearch_shards", default: 5, null: false + t.integer "elasticsearch_replicas", default: 1, null: false t.index ["usage_stats_set_by_user_id"], name: "index_application_settings_on_usage_stats_set_by_user_id", using: :btree end |