Sha256: db9e144610b34b62cbcdf0a1a484e5b6fc8c02ffdd35e92f5c26a56b84eed269

Contents?: true

Size: 539 Bytes

Versions: 3

Compression:

Stored size: 539 Bytes

Contents

# This migration comes from recommendable (originally 20120127092558)
class CreateIgnores < ActiveRecord::Migration
  def up
    create_table :ignores, :force => true do |t|
      t.references :user
      t.references :ignoreable, :polymorphic => true
      t.timestamps
    end
    
    add_index :ignores, :ignoreable_id
    add_index :ignores, :ignoreable_type
    add_index :ignores, [:user_id, :ignoreable_id, :ignoreable_type], :unique => true, :name => "user_ignore_constraint"
  end
  
  def down
    drop_table :ignores
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
recommendable-0.1.4 spec/dummy/db/migrate/20120128005555_create_ignores.recommendable.rb
recommendable-0.1.3 spec/dummy/db/migrate/20120128005555_create_ignores.recommendable.rb
recommendable-0.1.2 spec/dummy/db/migrate/20120128005555_create_ignores.recommendable.rb