2017-02-06 12:48:46 +00:00
|
|
|
class AddUniqueIpsLimitToApplicationSettings < ActiveRecord::Migration
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
DOWNTIME = false
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
|
|
|
def up
|
2017-02-20 14:09:05 +00:00
|
|
|
add_column_with_default :application_settings, :unique_ips_limit_per_user, :integer, default: 10
|
|
|
|
add_column_with_default :application_settings, :unique_ips_limit_time_window, :integer, default: 3600
|
|
|
|
add_column_with_default :application_settings, :unique_ips_limit_enabled, :boolean, default: false
|
2017-02-06 12:48:46 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
2017-02-20 14:09:05 +00:00
|
|
|
remove_column :application_settings, :unique_ips_limit_per_user
|
|
|
|
remove_column :application_settings, :unique_ips_limit_time_window
|
|
|
|
remove_column :application_settings, :unique_ips_limit_enabled
|
2017-02-06 12:48:46 +00:00
|
|
|
end
|
|
|
|
end
|