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.
19 lines
814 B
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
|