Sha256: 4b96f47b51672c2b121a28fa4e86787ad21e42e24a3ece2eeec981adda97fdf4

Contents?: true

Size: 505 Bytes

Versions: 7

Compression:

Stored size: 505 Bytes

Contents

# This migration comes from spree (originally 20100223170312)
class StiForTransactions < ActiveRecord::Migration
  def up
    rename_table  :creditcard_txns, :transactions
    add_column    :transactions, :type, :string
    remove_column :transactions, :creditcard_id

    execute "UPDATE transactions SET type = 'CreditcardTxn'"
  end

  def down
    rename_table  :transactions, :creditcard_txns
    remove_column :transactions, :type
    add_column    :transactions, :creditcard_id, :integer
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
spree_mercado_pago_payment_method-0.0.2 spec/dummy/db/migrate/20121121030171_sti_for_transactions.spree.rb
spree_mercado_pago_payment_method-0.1.1 spec/dummy/db/migrate/20121121030171_sti_for_transactions.spree.rb
spree_mercado_pago_payment_method-0.1.0 spec/dummy/db/migrate/20121121030171_sti_for_transactions.spree.rb
datashift_spree-0.3.0 spec/sandbox/db/migrate/20121023154390_sti_for_transactions.spree.rb
datashift_spree-0.2.1 spec/sandbox/db/migrate/20121015151183_sti_for_transactions.spree.rb
datashift_spree-0.2.0 spec/sandbox/db/migrate/20120925192751_sti_for_transactions.spree.rb
datashift_spree-0.1.0 spec/sandbox/db/migrate/20120918081482_sti_for_transactions.spree.rb