|
@ -0,0 +1,19 @@ |
|
|
|
|
|
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 |