2019-04-28 11:56:16 +03:00
|
|
|
class CreateVolunteerships < ActiveRecord::Migration[4.2]
|
2015-09-02 00:07:50 +03:00
|
|
|
def change
|
|
|
|
create_table :volunteerships do |t|
|
|
|
|
t.references :volunteer_team, index: true, foreign_key: true
|
|
|
|
t.references :volunteer, index: true
|
|
|
|
|
|
|
|
t.timestamps null: false
|
|
|
|
end
|
|
|
|
|
|
|
|
add_foreign_key :volunteerships, :users, column: :volunteer_id
|
|
|
|
end
|
|
|
|
end
|