mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-29 10:24:20 +01:00
14 lines
450 B
Ruby
14 lines
450 B
Ruby
|
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
|