diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2015-12-28 20:00:32 +0300 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2015-12-28 20:00:32 +0300 |
commit | 4d925f2147884812e349031a19f0d7ced9d5fdaf (patch) | |
tree | c15476c76ec6d6f0d2522b7362dec404aecb5dd9 /db | |
parent | 540eb0a9affef14329418b32be0dcd60f2b66e29 (diff) |
Move InfluxDB settings to ApplicationSetting
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20151228150906_influxdb_settings.rb | 18 | ||||
-rw-r--r-- | db/schema.rb | 10 |
2 files changed, 27 insertions, 1 deletions
diff --git a/db/migrate/20151228150906_influxdb_settings.rb b/db/migrate/20151228150906_influxdb_settings.rb new file mode 100644 index 00000000000..3012bd52cfd --- /dev/null +++ b/db/migrate/20151228150906_influxdb_settings.rb @@ -0,0 +1,18 @@ +class InfluxdbSettings < ActiveRecord::Migration + def change + add_column :application_settings, :metrics_enabled, :boolean, default: false + + add_column :application_settings, :metrics_host, :string, + default: 'localhost' + + add_column :application_settings, :metrics_database, :string, + default: 'gitlab' + + add_column :application_settings, :metrics_username, :string + add_column :application_settings, :metrics_password, :string + add_column :application_settings, :metrics_pool_size, :integer, default: 16 + add_column :application_settings, :metrics_timeout, :integer, default: 10 + add_column :application_settings, :metrics_method_call_threshold, + :integer, default: 10 + end +end diff --git a/db/schema.rb b/db/schema.rb index 49fa258660d..dc9ba36d0c7 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20151224123230) do +ActiveRecord::Schema.define(version: 20151228150906) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -52,6 +52,14 @@ ActiveRecord::Schema.define(version: 20151224123230) do t.string "runners_registration_token" t.boolean "require_two_factor_authentication", default: false t.integer "two_factor_grace_period", default: 48 + t.boolean "metrics_enabled", default: false + t.string "metrics_host", default: "localhost" + t.string "metrics_database", default: "gitlab" + t.string "metrics_username" + t.string "metrics_password" + t.integer "metrics_pool_size", default: 16 + t.integer "metrics_timeout", default: 10 + t.integer "metrics_method_call_threshold", default: 10 end create_table "audit_events", force: :cascade do |t| |