db/migrate/20120124193728_create_dislikes.rb in recommendable-0.1.4 vs db/migrate/20120124193728_create_dislikes.rb in recommendable-0.1.5
- old
+ new
@@ -1,17 +1,17 @@
class CreateDislikes < ActiveRecord::Migration
def up
- create_table :dislikes do |t|
+ create_table :recommendable_dislikes do |t|
t.references :user
t.references :dislikeable, :polymorphic => true
t.timestamps
end
- add_index :dislikes, :dislikeable_id
- add_index :dislikes, :dislikeable_type
- add_index :dislikes, [:user_id, :dislikeable_id, :dislikeable_type], :unique => true, :name => "user_dislike_constraint"
+ add_index :recommendable_dislikes, :dislikeable_id
+ add_index :recommendable_dislikes, :dislikeable_type
+ add_index :recommendable_dislikes, [:user_id, :dislikeable_id, :dislikeable_type], :unique => true, :name => "user_dislike_constraint"
end
def down
- drop_table :dislikes
+ drop_table :recommendable_dislikes
end
end