1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00
fab-manager/db/migrate/20160704165139_create_wallet_transactions.rb

16 lines
485 B
Ruby

# frozen_string_literal:true
class CreateWalletTransactions < ActiveRecord::Migration[4.2]
def change
create_table :wallet_transactions do |t|
t.belongs_to :user, index: true, foreign_key: true
t.belongs_to :wallet, index: true, foreign_key: true
t.references :transactable, polymorphic: true, index: {name: 'index_wallet_transactions_on_transactable'}
t.string :transaction_type
t.integer :amount
t.timestamps null: false
end
end
end