summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20130117142600_change_action_prerouting_table.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/db/migrate/20130117142600_change_action_prerouting_table.rb b/db/migrate/20130117142600_change_action_prerouting_table.rb
new file mode 100644
index 0000000..8b57ca6
--- /dev/null
+++ b/db/migrate/20130117142600_change_action_prerouting_table.rb
@@ -0,0 +1,13 @@
+class ChangeActionPreroutingTable < ActiveRecord::Migration
+ def up
+ RouteElement.where(:action => 'set_route_var', :mandatory => true).each do |route|
+ route.update_attributes(:action => 'match')
+ end
+ end
+
+ def down
+ RouteElement.where(:action => 'match', :mandatory => true).each do |route|
+ route.update_attributes(:action => 'set_route_var')
+ end
+ end
+end