Sha256: ecd1087f14538146711d41f35374314d48a27a0a1b91fef63d9c348c5e6a0817

Contents?: true

Size: 417 Bytes

Versions: 35

Compression:

Stored size: 417 Bytes

Contents

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

35 entries across 35 versions & 3 rubygems

Version Path
spree_core-1.1.0 db/migrate/20100812162326_payments_state_and_assigned_to_order_only.rb
spree_core-1.0.4 db/migrate/20100812162326_payments_state_and_assigned_to_order_only.rb
spree_core-1.1.0.rc2 db/migrate/20100812162326_payments_state_and_assigned_to_order_only.rb
spree_core-1.1.0.rc1 db/migrate/20100812162326_payments_state_and_assigned_to_order_only.rb
spree_pag_seguro-1.0.3 spec/dummy/db/migrate/20120301154102_payments_state_and_assigned_to_order_only.rb
spree_pag_seguro-1.0.2 spec/dummy/db/migrate/20120301154102_payments_state_and_assigned_to_order_only.rb
spree_core-1.0.3 db/migrate/20100812162326_payments_state_and_assigned_to_order_only.rb
spree_core-1.0.2 db/migrate/20100812162326_payments_state_and_assigned_to_order_only.rb
spree_core-1.0.1 db/migrate/20100812162326_payments_state_and_assigned_to_order_only.rb
spree_flat_in_range-0.1.0 spec/dummy/db/migrate/20120218160409_payments_state_and_assigned_to_order_only.rb
spree_core-1.0.0 db/migrate/20100812162326_payments_state_and_assigned_to_order_only.rb
spree_core-1.0.0.rc4 db/migrate/20100812162326_payments_state_and_assigned_to_order_only.rb
spree_core-1.0.0.rc3 db/migrate/20100812162326_payments_state_and_assigned_to_order_only.rb
spree_core-1.0.0.rc2 db/migrate/20100812162326_payments_state_and_assigned_to_order_only.rb
spree_core-1.0.0.rc1 db/migrate/20100812162326_payments_state_and_assigned_to_order_only.rb