Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Add migration to set all Stores Default Country values

Damian Legawiecd4aed16e23b6
diff --git a/core/db/migrate/20210608045519_ensure_store_default_country_is_set.rb b/core/db/migrate/20210608045519_ensure_store_default_country_is_set.rb
new file mode 100644
index 0000000000..6800f69852
--- /dev/null
+++ b/core/db/migrate/20210608045519_ensure_store_default_country_is_set.rb
@@ -0,0 +1,5 @@
+class EnsureStoreDefaultCountryIsSet < ActiveRecord::Migration[5.2]
+ def change
+ Spree::Store.find_each(&:save)
+ end
+end