Sha256: a0b5a06df1685acbb08c8c86a2dabf7fd48203c307008fa58a3c59360746ac9d
Contents?: true
Size: 512 Bytes
Versions: 3
Compression:
Stored size: 512 Bytes
Contents
# This migration comes from recommendable (originally 20120124193723) class CreateLikes < ActiveRecord::Migration def up create_table :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" end def down drop_table :likes end end
Version data entries
3 entries across 3 versions & 1 rubygems