Class: CreateReleasableCandidateItems

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/act_as_releasable/templates/create_releasable_candidate_items.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
# File 'lib/generators/act_as_releasable/templates/create_releasable_candidate_items.rb', line 2

def change
  create_table :releasable_candidate_items do |t|
    t.string :item_type, :null => false
    t.integer :item_id,   :null => false
    t.text :candidate_data
    t.string :collection_name
    t.timestamps
  end
  add_index :releasable_candidate_items, :item_id
  add_index :releasable_candidate_items, [:item_type, :item_id]
end