20171101130535_add_gitaly_timeout_properties_to_application_settings.rb 1.06 KB
Newer Older
1 2 3
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.

4
class AddGitalyTimeoutPropertiesToApplicationSettings < ActiveRecord::Migration[4.2]
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  disable_ddl_transaction!

  def up
    add_column_with_default :application_settings,
                            :gitaly_timeout_default,
                            :integer,
                            default: 55
    add_column_with_default :application_settings,
                            :gitaly_timeout_medium,
                            :integer,
                            default: 30
    add_column_with_default :application_settings,
                            :gitaly_timeout_fast,
                            :integer,
                            default: 10
  end

  def down
    remove_column :application_settings, :gitaly_timeout_default
    remove_column :application_settings, :gitaly_timeout_medium
    remove_column :application_settings, :gitaly_timeout_fast
  end
end