Sha256: 1940bdbe2835f42e009decbeccbf3e9d03229c32db0ef8f82a8a325e2440e6fe

Contents?: true

Size: 867 Bytes

Versions: 4

Compression:

Stored size: 867 Bytes

Contents

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mks_edm-1.0.5 db/migrate/20171220133548_create_mks_edm_equipment_valuations.rb
mks_edm-1.0.4 db/migrate/20171220133548_create_mks_edm_equipment_valuations.rb
mks_edm-1.0.2 db/migrate/20171220133548_create_mks_edm_equipment_valuations.rb
mks_edm-1.0.1 db/migrate/20171220133548_create_mks_edm_equipment_valuations.rb