diff options
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20130224081700_groups_to_user_groups_in_routes.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/db/migrate/20130224081700_groups_to_user_groups_in_routes.rb b/db/migrate/20130224081700_groups_to_user_groups_in_routes.rb new file mode 100644 index 0000000..5e03cfa --- /dev/null +++ b/db/migrate/20130224081700_groups_to_user_groups_in_routes.rb @@ -0,0 +1,19 @@ +class GroupsToUserGroupsInRoutes < ActiveRecord::Migration + def up + RouteElement.where(:var_in => 'val:auth_account.owner.groups').each do |route_element| + route_element.update_attributes(:var_in => 'val:auth_account.owner.user_groups') + end + RouteElement.where(:var_in => 'val:account.owner.groups').each do |route_element| + route_element.update_attributes(:var_in => 'val:account.owner.user_groups') + end + end + + def down + RouteElement.where(:var_in => 'val:auth_account.owner.user_groups').each do |route_element| + route_element.update_attributes(:var_in => 'val:auth_account.owner.groups') + end + RouteElement.where(:var_in => 'val:account.owner.user_groups').each do |route_element| + route_element.update_attributes(:var_in => 'val:account.owner.groups') + end + end +end |