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

class AddCommonCostsToLoad < ActiveRecord::Migration
def self.up
add_column :loads, :fuel_gallons, :decimal, :precision => 8, :scale => 3, :default => 0
add_column :loads, :fuel_cost, :decimal, :precision => 8, :scale => 2, :default => 0
add_column :loads, :scales, :decimal, :precision => 6, :scale => 2, :default => 0
add_column :loads, :loading, :decimal, :precision => 6, :scale => 2, :default => 0
add_column :loads, :unloading, :decimal, :precision => 6, :scale => 2, :default => 0
add_column :loads, :stops, :integer, :default => 0
end
def self.down
remove_column :loads, :stops
remove_column :loads, :unloading
remove_column :loads, :loading
remove_column :loads, :scales
remove_column :loads, :fuel_cost
remove_column :loads, :fuel_gallons
end
end