class CreateMksEdmEquipmentValuations < ActiveRecord::Migration[5.1] def change create_table :mks_edm_equipment_valuations do |t| t.references :equipment_item, index: { name: 'ev_on_ei_indx' } # TODO: rename initial_cost to equipment_value t.float :initial_cost, null: false t.float :residual_value, null: false t.float :work_hrs_per_yr, null: false t.float :life_year, null: false t.float :insurance_premium, null: false t.float :fuel_cost_per_hr t.float :oil_rate t.float :repair_rate t.float :rate_of_return #TODO: dep_method should be removed because it should be dynamic t.string :dep_method t.boolean :is_current, default: true t.timestamps end add_foreign_key :mks_edm_equipment_valuations, :mks_edm_equipment_items, column: :equipment_item_id end end