Class: CreateBitcoinPayments
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateBitcoinPayments
- Defined in:
- lib/generators/bitcoin_payable/templates/create_bitcoin_payments.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/generators/bitcoin_payable/templates/create_bitcoin_payments.rb', line 2 def change create_table :bitcoin_payments do |t| t.string :payable_type t.integer :payable_id t.string :currency t.string :reason t.integer :price t.float :btc_amount_due, default: 0 t.string :address t.string :state t.datetime :created_at t.datetime :updated_at end add_index :bitcoin_payments, [:payable_type, :payable_id] end |