Sha256: 38fd7cda5f4bc9ef50f60a729b6ba5ea86ce38f600ccc30c6b2f7ed3ec3d84d9

Contents?: true

Size: 995 Bytes

Versions: 4

Compression:

Stored size: 995 Bytes

Contents

class CreateBitcoinActiveRecordModels < ActiveRecord::Migration
  def change
    create_table "payments" do |t|
      t.integer "btc_address_id", null: false
      t.decimal "amount",         null: false
      t.string  "txid",           null: false
      t.timestamps
    end
    add_index "payments", ["btc_address_id"]
    add_index "payments", ["txid"], unique: true

    create_table "btc_addresses" do |t|
      t.string  "public_key", null: false
      t.timestamps
    end
    add_index "btc_addresses", ["public_key"], unique: true

    create_table "received_payments" do |t|
      t.integer "payment_id", null: false
      t.integer "btc_address_id", null: false
      t.timestamps
    end
    add_index "received_payments", ["payment_id"], unique: true
    add_index :received_payments, :btc_address_id

    create_table "sent_payments" do |t|
      t.integer "payment_id", null: false
      t.timestamps
    end
    add_index "sent_payments", ["payment_id"], unique: true
  end
end

Version data entries

4 entries across 2 versions & 1 rubygems

Version Path
bitcoin_active_record-0.0.2 lib/generators/templates/create_bitcoin_active_record_models.rb
bitcoin_active_record-0.0.2 test/db/migrate/20150425185338_create_bitcoin_active_record_models.rb
bitcoin_active_record-0.0.1 lib/generators/templates/create_bitcoin_active_record_models.rb
bitcoin_active_record-0.0.1 test/db/migrate/20150425185338_create_bitcoin_active_record_models.rb