Sha256: 13082bc4d2e6a5f16c57c728c083c076c3fecb55454e4174d13de8a3e7709234

Contents?: true

Size: 396 Bytes

Versions: 10

Compression:

Stored size: 396 Bytes

Contents

class AddSupportedCurrenciesToStore < ActiveRecord::Migration[5.2]
  def change
    unless column_exists?(:spree_stores, :supported_currencies)
      add_column :spree_stores, :supported_currencies, :string
      Spree::Store.reset_column_information
      Spree::Store.all.each do |store|
        store.update_attribute(:supported_currencies, store.default_currency)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
spree_core-4.2.7 db/migrate/20191017121054_add_supported_currencies_to_store.rb
spree_core-4.3.3 db/migrate/20191017121054_add_supported_currencies_to_store.rb
spree_core-4.2.6 db/migrate/20191017121054_add_supported_currencies_to_store.rb
spree_core-4.3.2 db/migrate/20191017121054_add_supported_currencies_to_store.rb
spree_core-4.3.1 db/migrate/20191017121054_add_supported_currencies_to_store.rb
spree_core-4.3.0 db/migrate/20191017121054_add_supported_currencies_to_store.rb
spree_core-4.3.0.rc3 db/migrate/20191017121054_add_supported_currencies_to_store.rb
spree_core-4.3.0.rc2 db/migrate/20191017121054_add_supported_currencies_to_store.rb
spree_core-4.3.0.rc1 db/migrate/20191017121054_add_supported_currencies_to_store.rb
spree_core-4.2.5 db/migrate/20191017121054_add_supported_currencies_to_store.rb