Sha256: 2e91c08e0c56af527b409feca5f033f953d441b21960834ad5b6abe3f1f9c8cf
Contents?: true
Size: 518 Bytes
Versions: 9
Compression:
Stored size: 518 Bytes
Contents
class CreateIgnores < ActiveRecord::Migration def up create_table :recommendable_ignores do |t| t.references :user t.references :ignorable, :polymorphic => true t.timestamps end add_index :recommendable_ignores, :ignorable_id add_index :recommendable_ignores, :ignorable_type add_index :recommendable_ignores, [:user_id, :ignorable_id, :ignorable_type], :unique => true, :name => "user_ignore_constraint" end def down drop_table :recommendable_ignores end end
Version data entries
9 entries across 9 versions & 1 rubygems