vita_app/db/migrate/20150614143556_create_commissions.rb
Nicolas Bally d52c017848 suite
2016-04-28 22:41:58 +02:00

16 lines
428 B
Ruby

class CreateCommissions < ActiveRecord::Migration
def change
create_table :commissions do |t|
t.references :product_customer, index: true
t.decimal :amount, precision: 10, scale: 2
t.boolean :canceled
t.datetime :canceled_at
t.integer :commission_type_id
t.integer :product_order_id
t.timestamps null: false
end
add_foreign_key :commissions, :product_customers
end
end