1 class CreatePurchases < ActiveRecord::Migration
3 create_table :purchases do |t|
5 t.column :type, :string
8 t.column :customer_id, :integer
10 t.column :price, :decimal, :precision => 8, :scale => 2, :default => 0
12 # RentablePurchase only
13 t.column :rentable_id, :integer
14 t.column :due_date, :date
16 # MerchandisePurchase only
17 t.column :merchandise_id, :integer
18 t.column :quantity, :integer