summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorspag <spag@golwen.net>2013-01-17 15:43:15 +0100
committerspag <spag@golwen.net>2013-01-17 15:43:15 +0100
commita36e8ea2bf092a23530b0ad54504667caa94e788 (patch)
treeb6ea00c1518f3c813a529dd7143401f702fbcc6b /db/migrate
parent48d569baeda24663b3adcb6532c9678f5b6ddbcb (diff)
set match action in prerouting table
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