summaryrefslogtreecommitdiff
path: root/db/migrate/20130814103800_change_perimeter_blacklist_entry.rb
blob: 597613fe1edbe3b2f9815a961587c308eb63bc81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class ChangePerimeterBlacklistEntry < ActiveRecord::Migration
  def up
    blacklist_file_entry = GsParameter.where(:entity => 'perimeter', :section => 'general', :name => 'blacklist_file_entry').first
    if blacklist_file_entry
      blacklist_file_entry.update_attributes(:value => 'DROP            net:{received_ip}        all                     udp     5060', :class_type => 'String')
    end
  end

  def down
    blacklist_file_entry = GsParameter.where(:entity => 'perimeter', :section => 'general', :name => 'blacklist_file_entry').first
    if blacklist_file_entry
      blacklist_file_entry.update_attributes(:value => '{received_ip} udp 5060', :class_type => 'String')
    end
  end
end