Browse files

Added migration to update data for namespace changes

  • Loading branch information...
1 parent c709395 commit 83419168301cd432b56557941f11086045d0b627 @BDQ BDQ committed Feb 8, 2012
Showing with 14 additions and 0 deletions.
  1. +9 −0 db/migrate/20120208144454_update_relation_types.rb
  2. +5 −0 script/rails
View
9 db/migrate/20120208144454_update_relation_types.rb
@@ -0,0 +1,9 @@
+class UpdateRelationTypes < ActiveRecord::Migration
+ def up
+ Spree::RelationType.where(:applies_to => 'Product').update_all(:applies_to => 'Spree::Product')
+ end
+
+ def down
+ Spree::RelationType.where(:applies_to => 'Spree::Product').update_all(:applies_to => 'Product')
+ end
+end
View
5 script/rails
@@ -0,0 +1,5 @@
+#!/usr/bin/env ruby
+# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
+
+ENGINE_PATH = File.expand_path('../..', __FILE__)
+load File.expand_path('../../spec/dummy/script/rails', __FILE__)

0 comments on commit 8341916

Please sign in to comment.