Sha256: 9299b74e5bbf08e234e01aba282508ca098945843fcfccd37943290860691e5b

Contents?: true

Size: 388 Bytes

Versions: 10

Compression:

Stored size: 388 Bytes

Contents

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

Version data entries

10 entries across 10 versions & 1 rubygems

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