16 lines
393 B
Ruby
16 lines
393 B
Ruby
class CreateCommissions < ActiveRecord::Migration
|
|
def change
|
|
create_table :commissions do |t|
|
|
t.references :annonce_account, index: true
|
|
t.decimal :amount
|
|
t.boolean :canceled
|
|
t.datetime :canceled_at
|
|
t.integer :commission_type_id
|
|
t.integer :order_id
|
|
|
|
t.timestamps null: false
|
|
end
|
|
add_foreign_key :commissions, :annonce_accounts
|
|
end
|
|
end
|