cirandas.net

ref: master

plugins/volunteers/db/migrate/20141012005354_create_volunteers_plugin_assignments.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
class CreateVolunteersPluginAssignments < ActiveRecord::Migration
  def up
    create_table :volunteers_plugin_assignments do |t|
      t.integer :profile_id
      t.integer :period_id

      t.timestamps
    end
    add_index :volunteers_plugin_assignments, [:period_id]
    add_index :volunteers_plugin_assignments, [:profile_id]
    add_index :volunteers_plugin_assignments, [:profile_id, :period_id]
  end

  def down
    drop_table :volunteers_plugin_assignments
  end
end