summaryrefslogtreecommitdiff
path: root/db/migrate/20171012101043_add_circuit_breaker_properties_to_application_settings.rb
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2017-10-12 12:28:43 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2017-10-17 11:50:31 +0200
commit85640c5cbbf3e08f562ecbebfeabc64862e85bed (patch)
tree88e24950cc0edf85679f0a019325ebdf6163bef6 /db/migrate/20171012101043_add_circuit_breaker_properties_to_application_settings.rb
parent03699653d6946a4b6ee178214d864d1add4f5cf1 (diff)
downloadgitlab-ce-85640c5cbbf3e08f562ecbebfeabc64862e85bed.tar.gz
Add existing circuitbreaker settings to the database
Diffstat (limited to 'db/migrate/20171012101043_add_circuit_breaker_properties_to_application_settings.rb')
-rw-r--r--db/migrate/20171012101043_add_circuit_breaker_properties_to_application_settings.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/db/migrate/20171012101043_add_circuit_breaker_properties_to_application_settings.rb b/db/migrate/20171012101043_add_circuit_breaker_properties_to_application_settings.rb
new file mode 100644
index 00000000000..bcf7dbd8e64
--- /dev/null
+++ b/db/migrate/20171012101043_add_circuit_breaker_properties_to_application_settings.rb
@@ -0,0 +1,27 @@
+# See http://doc.gitlab.com/ce/development/migration_style_guide.html
+# for more information on how to write migrations for GitLab.
+
+class AddCircuitBreakerPropertiesToApplicationSettings < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def change
+ add_column :application_settings,
+ :circuitbreaker_failure_count_threshold,
+ :integer,
+ default: 160
+ add_column :application_settings,
+ :circuitbreaker_failure_wait_time,
+ :integer,
+ default: 30
+ add_column :application_settings,
+ :circuitbreaker_failure_reset_time,
+ :integer,
+ default: 1800
+ add_column :application_settings,
+ :circuitbreaker_storage_timeout,
+ :integer,
+ default: 30
+ end
+end