Sha256: cbd44f3edfcab617484ed9207337f7f9da4ff532a8982dc99e0a7603f64c366f

Contents?: true

Size: 354 Bytes

Versions: 12

Compression:

Stored size: 354 Bytes

Contents

class AddDefaultCountryIdToSpreeStore < ActiveRecord::Migration[6.0]
  def change
    unless column_exists?(:spree_stores, :default_country_id)
      add_column :spree_stores, :default_country_id, :integer
      Spree::Store.reset_column_information
      Spree::Store.update_all(default_country_id: Spree::Config[:default_country_id])
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
spree_core-4.2.4 db/migrate/20200423123001_add_default_country_id_to_spree_store.rb
spree_core-4.2.3.1 db/migrate/20200423123001_add_default_country_id_to_spree_store.rb
spree_core-4.2.3 db/migrate/20200423123001_add_default_country_id_to_spree_store.rb
spree_core-4.2.2 db/migrate/20200423123001_add_default_country_id_to_spree_store.rb
spree_core-4.2.1 db/migrate/20200423123001_add_default_country_id_to_spree_store.rb
spree_core-4.2.0 db/migrate/20200423123001_add_default_country_id_to_spree_store.rb
spree_core-4.2.0.rc5 db/migrate/20200423123001_add_default_country_id_to_spree_store.rb
spree_core-4.2.0.rc4 db/migrate/20200423123001_add_default_country_id_to_spree_store.rb
spree_core-4.2.0.rc3 db/migrate/20200423123001_add_default_country_id_to_spree_store.rb
spree_core-4.2.0.rc2 db/migrate/20200423123001_add_default_country_id_to_spree_store.rb
spree_core-4.2.0.rc1 db/migrate/20200423123001_add_default_country_id_to_spree_store.rb
spree_core-4.2.0.beta db/migrate/20200423123001_add_default_country_id_to_spree_store.rb