Sha256: db7de0c17416c4913e07d44c95ed451524e73daefc846f3e1e8136dc9c4fd06a

Contents?: true

Size: 535 Bytes

Versions: 35

Compression:

Stored size: 535 Bytes

Contents

class Adjustment < ActiveRecord::Base; end;

class FixExistingCouponCredits < ActiveRecord::Migration
  def up
    execute("UPDATE adjustments SET type='PromotionCredit' WHERE type='CouponCredit'")
    execute("UPDATE adjustments SET adjustment_source_type='Promotion' WHERE adjustment_source_type='Coupon'")
  end

  def down
    execute("UPDATE adjustments SET adjustment_source_type='Coupon' WHERE adjustment_source_type='Promotion'")
    execute("UPDATE adjustments SET type='CouponCredit' WHERE type='PromotionCredit'")
  end
end

Version data entries

35 entries across 35 versions & 3 rubygems

Version Path
spree_core-1.1.0 db/migrate/20100419194457_fix_existing_coupon_credits.rb
spree_core-1.0.4 db/migrate/20100419194457_fix_existing_coupon_credits.rb
spree_core-1.1.0.rc2 db/migrate/20100419194457_fix_existing_coupon_credits.rb
spree_core-1.1.0.rc1 db/migrate/20100419194457_fix_existing_coupon_credits.rb
spree_pag_seguro-1.0.3 spec/dummy/db/migrate/20120301154089_fix_existing_coupon_credits.rb
spree_pag_seguro-1.0.2 spec/dummy/db/migrate/20120301154089_fix_existing_coupon_credits.rb
spree_core-1.0.3 db/migrate/20100419194457_fix_existing_coupon_credits.rb
spree_core-1.0.2 db/migrate/20100419194457_fix_existing_coupon_credits.rb
spree_core-1.0.1 db/migrate/20100419194457_fix_existing_coupon_credits.rb
spree_flat_in_range-0.1.0 spec/dummy/db/migrate/20120218160396_fix_existing_coupon_credits.rb
spree_core-1.0.0 db/migrate/20100419194457_fix_existing_coupon_credits.rb
spree_core-1.0.0.rc4 db/migrate/20100419194457_fix_existing_coupon_credits.rb
spree_core-1.0.0.rc3 db/migrate/20100419194457_fix_existing_coupon_credits.rb
spree_core-1.0.0.rc2 db/migrate/20100419194457_fix_existing_coupon_credits.rb
spree_core-1.0.0.rc1 db/migrate/20100419194457_fix_existing_coupon_credits.rb