cirandas.net

ref: master

db/migrate/20110403193953_create_price_details.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
class CreatePriceDetails < ActiveRecord::Migration
  def self.up
    create_table :price_details do |t|
      t.decimal :price, :default => 0
      t.references :product
      t.references :production_cost
      t.timestamps
    end
  end

  def self.down
    drop_table :price_details
  end
end