mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-28 09:24:24 +01:00
16 lines
485 B
Ruby
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
|