Sha256: f271a293c298f98c498a53b4b415290022cf9a18bf5d724746f39ff5ae2192e6

Contents?: true

Size: 347 Bytes

Versions: 7

Compression:

Stored size: 347 Bytes

Contents

# This migration comes from spree (originally 20111201024007)
class MakeAdjustmentsPolymorphic < ActiveRecord::Migration

  def change
    add_column :spree_adjustments, :adjustable_type, :string
    rename_column :spree_adjustments, :order_id, :adjustable_id
    execute "UPDATE spree_adjustments SET adjustable_type = 'Spree::Order'"
  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/20121121030223_make_adjustments_polymorphic.spree.rb
spree_mercado_pago_payment_method-0.1.1 spec/dummy/db/migrate/20121121030223_make_adjustments_polymorphic.spree.rb
spree_mercado_pago_payment_method-0.1.0 spec/dummy/db/migrate/20121121030223_make_adjustments_polymorphic.spree.rb
datashift_spree-0.3.0 spec/sandbox/db/migrate/20121023154442_make_adjustments_polymorphic.spree.rb
datashift_spree-0.2.1 spec/sandbox/db/migrate/20121015151235_make_adjustments_polymorphic.spree.rb
datashift_spree-0.2.0 spec/sandbox/db/migrate/20120925192803_make_adjustments_polymorphic.spree.rb
datashift_spree-0.1.0 spec/sandbox/db/migrate/20120918081534_make_adjustments_polymorphic.spree.rb