From: Jakub MacArthur Date: Wed, 21 Dec 2022 10:54:33 +0000 (+0100) Subject: luxembourg-provices added missing provices, updated outdated ISO codes, renamed one... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=3a493eda35d8b2d2610cd9bf22f2263d51910f2d;p=civicrm-core.git luxembourg-provices added missing provices, updated outdated ISO codes, renamed one provice --- diff --git a/CRM/Upgrade/Incremental/sql/5.59.alpha1.mysql.tpl b/CRM/Upgrade/Incremental/sql/5.59.alpha1.mysql.tpl index c9bef4a848..af3abf96a2 100644 --- a/CRM/Upgrade/Incremental/sql/5.59.alpha1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/5.59.alpha1.mysql.tpl @@ -1 +1,16 @@ -{* file to handle db changes in 5.59.alpha1 during upgrade *} +-- Add missing provinces for Luxembourg +SELECT @country_id := id from civicrm_country where name = 'Luxembourg' AND iso_code = 'LU'; +INSERT IGNORE INTO `civicrm_state_province` (`country_id`, `abbreviation`, `name`) VALUES (@country_id, 'CA', 'Capellen'); +INSERT IGNORE INTO `civicrm_state_province` (`country_id`, `abbreviation`, `name`) VALUES (@country_id, 'CL', 'Clervaux'); +INSERT IGNORE INTO `civicrm_state_province` (`country_id`, `abbreviation`, `name`) VALUES (@country_id, 'EC', 'Echternach'); +INSERT IGNORE INTO `civicrm_state_province` (`country_id`, `abbreviation`, `name`) VALUES (@country_id, 'ES', 'Esch-sur-Alzette'); +INSERT IGNORE INTO `civicrm_state_province` (`country_id`, `abbreviation`, `name`) VALUES (@country_id, 'GR', 'Grevenmacher'); +INSERT IGNORE INTO `civicrm_state_province` (`country_id`, `abbreviation`, `name`) VALUES (@country_id, 'ME', 'Mersch'); +INSERT IGNORE INTO `civicrm_state_province` (`country_id`, `abbreviation`, `name`) VALUES (@country_id, 'RD', 'Redange-sur-Attert'); +INSERT IGNORE INTO `civicrm_state_province` (`country_id`, `abbreviation`, `name`) VALUES (@country_id, 'RM', 'Remich'); +INSERT IGNORE INTO `civicrm_state_province` (`country_id`, `abbreviation`, `name`) VALUES (@country_id, 'VD', 'Vianden'); +INSERT IGNORE INTO `civicrm_state_province` (`country_id`, `abbreviation`, `name`) VALUES (@country_id, 'WI', 'Wiltz'); +UPDATE `civicrm_state_province` SET abbreviation = 'LU' WHERE name = 'Luxembourg'; +UPDATE `civicrm_state_province` SET abbreviation = 'DI' WHERE name = 'Diekirch'; +UPDATE `civicrm_state_province` SET name = 'Grevenmacher' WHERE name = 'GreveNmacher'; +UPDATE `civicrm_state_province` SET abbreviation = 'GR' WHERE name = 'Grevenmacher'; diff --git a/xml/templates/civicrm_state_province.tpl b/xml/templates/civicrm_state_province.tpl index d275181a1a..68411b2c59 100644 --- a/xml/templates/civicrm_state_province.tpl +++ b/xml/templates/civicrm_state_province.tpl @@ -4166,4 +4166,18 @@ INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (NULL, 1101, "LA", "Ladākh") -- end of statement: + +-- Add missing provinces for Luxembourg +(NULL, 1020, 'CA', 'Capellen'), +(NULL, 1020, 'CL', 'Clervaux'), +(NULL, 1020, 'EC', 'Echternach'), +(NULL, 1020, 'ES', 'Esch-sur-Alzette'), +(NULL, 1020, 'GR', 'Grevenmacher'), +(NULL, 1020, 'ME', 'Mersch'), +(NULL, 1020, 'RD', 'Redange-sur-Attert'), +(NULL, 1020, 'RM', 'Remich'), +(NULL, 1020, 'VD', 'Vianden'), +(NULL, 1020, 'WI', 'Wiltz'), + +-- end of statement: ;