Sha256: eeb226088cbc5088b81644d8974d39bb20d414dbb793f3e3369342e5b81d2fe5

Contents?: true

Size: 454 Bytes

Versions: 9

Compression:

Stored size: 454 Bytes

Contents

# This migration comes from spree (originally 20150727191614)
class SpreeStoreCreditTypes < ActiveRecord::Migration[4.2]
  def up
    Spree::StoreCreditType.find_or_create_by(name: 'Expiring', priority: 1)
    Spree::StoreCreditType.find_or_create_by(name: 'Non-expiring', priority: 2)
  end

  def down
    Spree::StoreCreditType.find_by(name: 'Expiring').try(&:destroy)
    Spree::StoreCreditType.find_by(name: 'Non-expiring').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/20191113195928_spree_store_credit_types.spree.rb
spree_billing_sisow-0.9.2 spec/dummy/db/migrate/20190729091869_spree_store_credit_types.spree.rb
spree_billing_sisow-0.9.1 spec/dummy/db/migrate/20190729091869_spree_store_credit_types.spree.rb
spree_purchase_order-3.6.0 spec/dummy/db/migrate/20180516182057_spree_store_credit_types.spree.rb
spree_purchase_order-3.5.0 spec/dummy/db/migrate/20180516182057_spree_store_credit_types.spree.rb
spree_purchase_order-3.5.0.rc1 spec/dummy/db/migrate/20180516182057_spree_store_credit_types.spree.rb
spree_purchase_order-3.4.0 spec/dummy/db/migrate/20180516182057_spree_store_credit_types.spree.rb
spree_purchase_order-3.3.0 spec/dummy/db/migrate/20180516182057_spree_store_credit_types.spree.rb
spree_purchase_order-3.2.0 spec/dummy/db/migrate/20180516182057_spree_store_credit_types.spree.rb