Sha256: 9d89d5f851e17970a28d90d83ed39dbdc20f96dc4408608a8ca1b41fe4ddfc59

Contents?: true

Size: 1.01 KB

Versions: 3

Compression:

Stored size: 1.01 KB

Contents

class RemovePaymentInfoFromTransactions < ActiveRecord::Migration
  def up
    change_table :tb_commerce_transactions do |t|
      # Removes authorize.net columns
      t.remove :gateway_transaction_id
      t.remove :billing_first_name
      t.remove :billing_last_name
      t.remove :billing_address
      t.remove :billing_address_2
      t.remove :billing_city
      t.remove :billing_state
      t.remove :billing_postal
      t.remove :billing_country

      # Adds stripe columns
      t.string :stripe_charge_id
      t.rename :response_text, :raw_response
    end
  end

  def down
    change_table :tb_commerce_transactions do |t|
      t.integer :gateway_transaction_id
      t.string :billing_first_name
      t.string :billing_last_name
      t.string :billing_address
      t.string :billing_address_2
      t.string :billing_city
      t.string :billing_state
      t.string :billing_postal
      t.string :billing_country
      t.remove :stripe_charge_id
      t.rename :raw_response, :response_text
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tb_commerce-0.0.4 db/migrate/20150810150548_remove_payment_info_from_transactions.rb
tb_commerce-0.0.3 db/migrate/20150810150548_remove_payment_info_from_transactions.rb
tb_commerce-0.0.2 db/migrate/20150810150548_remove_payment_info_from_transactions.rb