Basis of rails-driven app for local business
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

19 lines
814 B

  1. class AddCommonCostsToLoad < ActiveRecord::Migration
  2. def self.up
  3. add_column :loads, :fuel_gallons, :decimal, :precision => 8, :scale => 3, :default => 0
  4. add_column :loads, :fuel_cost, :decimal, :precision => 8, :scale => 2, :default => 0
  5. add_column :loads, :scales, :decimal, :precision => 6, :scale => 2, :default => 0
  6. add_column :loads, :loading, :decimal, :precision => 6, :scale => 2, :default => 0
  7. add_column :loads, :unloading, :decimal, :precision => 6, :scale => 2, :default => 0
  8. add_column :loads, :stops, :integer, :default => 0
  9. end
  10. def self.down
  11. remove_column :loads, :stops
  12. remove_column :loads, :unloading
  13. remove_column :loads, :loading
  14. remove_column :loads, :scales
  15. remove_column :loads, :fuel_cost
  16. remove_column :loads, :fuel_gallons
  17. end
  18. end