spec/dummy/db/migrate/20120128005553_create_likes.recommendable.rb in recommendable-0.1.4 vs spec/dummy/db/migrate/20120128005553_create_likes.recommendable.rb in recommendable-0.1.5
- old
+ new
@@ -1,18 +1,18 @@
# This migration comes from recommendable (originally 20120124193723)
class CreateLikes < ActiveRecord::Migration
def up
- create_table :likes, :force => true do |t|
+ create_table :recommendable_likes, :force => true do |t|
t.references :user
t.references :likeable, :polymorphic => true
t.timestamps
end
- add_index :likes, :likeable_id
- add_index :likes, :likeable_type
- add_index :likes, [:user_id, :likeable_id, :likeable_type], :unique => true, :name => "user_like_constraint"
+ add_index :recommendable_likes, :likeable_id
+ add_index :recommendable_likes, :likeable_type
+ add_index :recommendable_likes, [:user_id, :likeable_id, :likeable_type], :unique => true, :name => "user_like_constraint"
end
def down
- drop_table :likes
+ drop_table :recommendable_likes
end
-end
\ No newline at end of file
+end