Permalink
Browse files

fix old migration for Rails 2.3.4

  • Loading branch information...
1 parent 3411dad commit 937758fa06702eea573a10307971493cf6ca9cba @jweiss jweiss committed Nov 17, 2009
Showing with 1 addition and 24 deletions.
  1. +1 −24 db/migrate/018_move_recipes_to_stages.rb
View
25 db/migrate/018_move_recipes_to_stages.rb
@@ -1,34 +1,11 @@
-class Recipe < ActiveRecord::Base
- has_and_belongs_to_many :recipes
- has_many :stages
-end
-
-class Stage < ActiveRecord::Base
- has_and_belongs_to_many :recipes
- belongs_to :project
-end
-
-class Recipe < ActiveRecord::Base
- has_and_belongs_to_many :projects
- has_and_belongs_to_many :stages
-end
-
class MoveRecipesToStages < ActiveRecord::Migration
def self.up
create_table "recipes_stages", :id => false, :force => true do |t|
t.integer "recipe_id"
t.integer "stage_id"
end
-
- Recipe.find(:all).each do |r|
- r.projects.each do |p|
- p.stages.each do |s|
- s.recipes << r
- end
- end
- end
-
+
end
def self.down

0 comments on commit 937758f

Please sign in to comment.