From 6f06d74253dfc9db1a4618ba4d8e4e835f90d10b Mon Sep 17 00:00:00 2001 From: Mathieu Lu Date: Mon, 6 Nov 2023 10:34:33 -0500 Subject: [PATCH] Add missing Zambia provinces --- CRM/Upgrade/Incremental/sql/5.69.alpha1.mysql.tpl | 8 ++++++++ xml/templates/civicrm_state_province.tpl | 13 +++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/CRM/Upgrade/Incremental/sql/5.69.alpha1.mysql.tpl b/CRM/Upgrade/Incremental/sql/5.69.alpha1.mysql.tpl index 0405696d40..d06b3d37ac 100644 --- a/CRM/Upgrade/Incremental/sql/5.69.alpha1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/5.69.alpha1.mysql.tpl @@ -1 +1,9 @@ {* file to handle db changes in 5.69.alpha1 during upgrade *} +-- Add missing provinces for Zambia +SELECT @country_id := id FROM civicrm_country WHERE name = 'Zambia'; +INSERT IGNORE INTO `civicrm_state_province` (`country_id`, `abbreviation`, `name`) VALUES (@country_id, 'C', 'Central'); +INSERT IGNORE INTO `civicrm_state_province` (`country_id`, `abbreviation`, `name`) VALUES (@country_id, 'E', 'Eastern'); +INSERT IGNORE INTO `civicrm_state_province` (`country_id`, `abbreviation`, `name`) VALUES (@country_id, 'M', 'Muchinga'); +INSERT IGNORE INTO `civicrm_state_province` (`country_id`, `abbreviation`, `name`) VALUES (@country_id, 'N', 'Northern'); +INSERT IGNORE INTO `civicrm_state_province` (`country_id`, `abbreviation`, `name`) VALUES (@country_id, 'S', 'Southern'); +INSERT IGNORE INTO `civicrm_state_province` (`country_id`, `abbreviation`, `name`) VALUES (@country_id, 'W', 'Western'); diff --git a/xml/templates/civicrm_state_province.tpl b/xml/templates/civicrm_state_province.tpl index 0246455a8c..f61cabc18c 100644 --- a/xml/templates/civicrm_state_province.tpl +++ b/xml/templates/civicrm_state_province.tpl @@ -4160,12 +4160,9 @@ INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (NULL, 1023, 'WAR', 'Warwick'), -- Add in missing Indian State provinces - (NULL, 1101, "DH", "Dādra and Nagar Haveli and Damān and Diu"), (NULL, 1101, "LA", "Ladākh"), - -- end of statement: - -- Add missing provinces for Luxembourg (NULL, 1126, 'CA', 'Capellen'), (NULL, 1126, 'CL', 'Clervaux'), @@ -4175,7 +4172,15 @@ INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (NULL, 1126, 'RD', 'Redange-sur-Attert'), (NULL, 1126, 'RM', 'Remich'), (NULL, 1126, 'VD', 'Vianden'), -(NULL, 1126, 'WI', 'Wiltz') +(NULL, 1126, 'WI', 'Wiltz'), + +-- Add missing provinces for Zambia +(NULL, 1239, 'C', 'Central'), +(NULL, 1239, 'E', 'Eastern'), +(NULL, 1239, 'M', 'Muchinga'), +(NULL, 1239, 'N', 'Northern'), +(NULL, 1239, 'S', 'Southern'), +(NULL, 1239, 'W', 'Western') -- end of statement: ; -- 2.25.1