Sha256: 571521eea636725eedede1130ac24742f6c8a3e70210699255e9fec381cda899

Contents?: true

Size: 385 Bytes

Versions: 9

Compression:

Stored size: 385 Bytes

Contents

# This migration comes from spree (originally 20150627090949)
class MigratePaymentMethodsDisplay < ActiveRecord::Migration[4.2]
  def change
    Spree::PaymentMethod.all.each do |method|
      if method.display_on.blank?
        method.display_on = "both"
        method.save
      end
    end

    change_column :spree_payment_methods, :display_on, :string, default: "both"
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
spree_purchase_order-3.7.0 spec/dummy/db/migrate/20191113195924_migrate_payment_methods_display.spree.rb
spree_billing_sisow-0.9.2 spec/dummy/db/migrate/20190729091865_migrate_payment_methods_display.spree.rb
spree_billing_sisow-0.9.1 spec/dummy/db/migrate/20190729091865_migrate_payment_methods_display.spree.rb
spree_purchase_order-3.6.0 spec/dummy/db/migrate/20180516182053_migrate_payment_methods_display.spree.rb
spree_purchase_order-3.5.0 spec/dummy/db/migrate/20180516182053_migrate_payment_methods_display.spree.rb
spree_purchase_order-3.5.0.rc1 spec/dummy/db/migrate/20180516182053_migrate_payment_methods_display.spree.rb
spree_purchase_order-3.4.0 spec/dummy/db/migrate/20180516182053_migrate_payment_methods_display.spree.rb
spree_purchase_order-3.3.0 spec/dummy/db/migrate/20180516182053_migrate_payment_methods_display.spree.rb
spree_purchase_order-3.2.0 spec/dummy/db/migrate/20180516182053_migrate_payment_methods_display.spree.rb