1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-05 16:24:21 +01:00
fab-manager/db/migrate/20160704165139_create_wallet_transactions.rb

14 lines
450 B
Ruby
Raw Normal View History

2016-07-04 19:20:10 +02:00
class CreateWalletTransactions < ActiveRecord::Migration
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