This ticket means to provide a way for consolidating Commerce's and Portal's Countries and Regions lists. There are four use cases to consider:
- Customer has a fresh installation.
- Customer is upgrading and has Portal and Commerce including Minium Demo Pack
- Customer is upgrading, has Portal and Commerce, but empty Commerce tables (one very likely case is because they don't have Minium)
- Customer is upgrading, has Portal and Commerce without Minium, but their Commerce tables are populated with their own values.
The following logic should cover all the mentioned use cases.
- Load default list of Countries and Regions (attached).
- Drop Portal’s Country and Region tables.
- Migrate existing Commerce’s Countries and Regions, if any (with exceptions*).
- Add the rest of the Countries and Regions from the default list that is missing from Portal’s Country and Region tables at this point.
- Omit Macau.
- For China, Macau and Hong Kong shall be listed as Aomen and Xianggang, respectively.
- Japan shall retain both its romanized and localized Region values.