diff options
Diffstat (limited to 'db/migrate/20130203164500_remove_perimeter_parameters.rb')
-rw-r--r-- | db/migrate/20130203164500_remove_perimeter_parameters.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/db/migrate/20130203164500_remove_perimeter_parameters.rb b/db/migrate/20130203164500_remove_perimeter_parameters.rb new file mode 100644 index 0000000..8c37174 --- /dev/null +++ b/db/migrate/20130203164500_remove_perimeter_parameters.rb @@ -0,0 +1,16 @@ +class RemovePerimeterParameters < ActiveRecord::Migration + def up + GsParameter.where(:entity => 'perimeter', :section => 'general', :name => 'malicious_contact_count').destroy_all + GsParameter.where(:entity => 'perimeter', :section => 'general', :name => 'malicious_contact_time_span').destroy_all + GsParameter.where(:entity => 'perimeter', :section => 'general', :name => 'ban_futile').destroy_all + GsParameter.where(:entity => 'perimeter', :section => 'general', :name => 'execute').destroy_all + + end + + def down + GsParameter.create(:entity => 'perimeter', :section => 'general', :name => 'malicious_contact_count', :value => 20, :class_type => 'Integer') + GsParameter.create(:entity => 'perimeter', :section => 'general', :name => 'malicious_contact_time_span', :value => 2, :class_type => 'Integer') + GsParameter.create(:entity => 'perimeter', :section => 'general', :name => 'ban_futile', :value => 5, :class_type => 'Integer') + GsParameter.create(:entity => 'perimeter', :section => 'general', :name => 'execute', :value => 'sudo /usr/local/bin/ban_ip.sh {ip_address}', :class_type => 'String') + end +end |