class CreateDispatches < ActiveRecord::Migration def change create_table :dispatches do |t| t.date :dispatch_date t.date :return_date t.text :comments t.timestamps end add_reference :dispatches, :asset_repair_request, index: true end end