Sha256: 282298424fbf86b277a0f284f54e7447e26396a6483eb75220a59c8f8cbd2315

Contents?: true

Size: 477 Bytes

Versions: 3

Compression:

Stored size: 477 Bytes

Contents

class CreateBestBoyEventsTable < ActiveRecord::Migration
  def self.up
    create_table :best_boy_events, :force => true do |t|
      t.integer :owner_id
      t.string :owner_type
      t.string :event
      t.timestamps
    end
    add_index :best_boy_events, :owner_id
    add_index :best_boy_events, :owner_type
    add_index :best_boy_events, [:owner_id, :owner_type]
    add_index :best_boy_events, :event
  end

  def self.down
    drop_table :best_boy_events
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
best_boy-0.1.0 lib/generators/active_record/templates/create_best_boy_events_table.rb
best_boy-0.0.3 lib/generators/active_record/templates/create_best_boy_events_table.rb
best_boy-0.0.2 lib/generators/active_record/templates/create_best_boy_events_table.rb