Class: CreateReleasableCandidates

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

Instance Method Summary collapse

Instance Method Details

#changeObject



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

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