Sha256: f086d3173b610b12b65c66959129b750e19df12799be7a7c9b2286bd7c1217b3

Contents?: true

Size: 479 Bytes

Versions: 7

Compression:

Stored size: 479 Bytes

Contents

# This migration comes from spree (originally 20100812162326)
class PaymentsStateAndAssignedToOrderOnly < ActiveRecord::Migration
  def up
    # TODO: migrate existing payments
    rename_column :payments, :payable_id, :order_id
    remove_column :payments, :payable_type
    add_column :payments, :state, :string
  end

  def down
    remove_column :payments, :state
    add_column :payments, :payable_type, :string
    rename_column :payments, :order_id, :payable_id
  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/20121121030189_payments_state_and_assigned_to_order_only.spree.rb
spree_mercado_pago_payment_method-0.1.1 spec/dummy/db/migrate/20121121030189_payments_state_and_assigned_to_order_only.spree.rb
spree_mercado_pago_payment_method-0.1.0 spec/dummy/db/migrate/20121121030189_payments_state_and_assigned_to_order_only.spree.rb
datashift_spree-0.3.0 spec/sandbox/db/migrate/20121023154408_payments_state_and_assigned_to_order_only.spree.rb
datashift_spree-0.2.1 spec/sandbox/db/migrate/20121015151201_payments_state_and_assigned_to_order_only.spree.rb
datashift_spree-0.2.0 spec/sandbox/db/migrate/20120925192769_payments_state_and_assigned_to_order_only.spree.rb
datashift_spree-0.1.0 spec/sandbox/db/migrate/20120918081500_payments_state_and_assigned_to_order_only.spree.rb