Sha256: 593540a7fa6f8a03c7d397e603eb119fd509d0016023197807d315ce73e38c28

Contents?: true

Size: 592 Bytes

Versions: 9

Compression:

Stored size: 592 Bytes

Contents

# This migration comes from spree (originally 20150714154102)
class SpreePaymentMethodStoreCredits < ActiveRecord::Migration[4.2]
  def up
    # Reload to pick up new position column for acts_as_list
    Spree::PaymentMethod.reset_column_information
    Spree::PaymentMethod::StoreCredit.find_or_create_by(name: 'Store Credit', description: 'Store Credit',
                                                        active: true, display_on: 'back_end')
  end

  def down
    Spree::PaymentMethod.find_by(type: 'Spree::PaymentMethod::StoreCredit', name: 'Store Credit').try(&:destroy)
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
spree_purchase_order-3.7.0 spec/dummy/db/migrate/20191113195926_spree_payment_method_store_credits.spree.rb
spree_billing_sisow-0.9.2 spec/dummy/db/migrate/20190729091867_spree_payment_method_store_credits.spree.rb
spree_billing_sisow-0.9.1 spec/dummy/db/migrate/20190729091867_spree_payment_method_store_credits.spree.rb
spree_purchase_order-3.6.0 spec/dummy/db/migrate/20180516182055_spree_payment_method_store_credits.spree.rb
spree_purchase_order-3.5.0 spec/dummy/db/migrate/20180516182055_spree_payment_method_store_credits.spree.rb
spree_purchase_order-3.5.0.rc1 spec/dummy/db/migrate/20180516182055_spree_payment_method_store_credits.spree.rb
spree_purchase_order-3.4.0 spec/dummy/db/migrate/20180516182055_spree_payment_method_store_credits.spree.rb
spree_purchase_order-3.3.0 spec/dummy/db/migrate/20180516182055_spree_payment_method_store_credits.spree.rb
spree_purchase_order-3.2.0 spec/dummy/db/migrate/20180516182055_spree_payment_method_store_credits.spree.rb