From 7b5908f705467eb89cf5078c857a7f4417cf61d8 Mon Sep 17 00:00:00 2001 From: JKingsnorth Date: Wed, 8 Mar 2017 11:19:39 +0000 Subject: [PATCH] CRM-19993 Fixes for ISO compliance with countries and counties --- CRM/Upgrade/Incremental/sql/4.7.18.mysql.tpl | 17 +++++++++++++++++ xml/templates/civicrm_country.tpl | 4 ++-- xml/templates/civicrm_state_province.tpl | 19 ++++++++++++++++--- 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/CRM/Upgrade/Incremental/sql/4.7.18.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.7.18.mysql.tpl index c23f15d0b5..0e9e08a4ca 100644 --- a/CRM/Upgrade/Incremental/sql/4.7.18.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.7.18.mysql.tpl @@ -51,3 +51,20 @@ INSERT IGNORE INTO civicrm_state_province (country_id, abbreviation, name) VALUE (@country_id, "46", "Wajir"), (@country_id, "47", "West Pokot"); +-- CRM-19993 Fixes for ISO compliance with countries and counties +INSERT INTO `civicrm_state_province` (`id`, `country_id`, `abbreviation`, `name`) VALUES +(NULL, 1101, "CH", "Chandigarh"), +(NULL, 1083, "CP", "Central"), +(NULL, 1083, "EP", "Eastern"), +(NULL, 1083, "NP", "Northern"), +(NULL, 1083, "WP", "Western"), +(NULL, 1181, "K", "Saint Kitts"), +(NULL, 1181, "N", "Nevis"), +(NULL, 1190, "E", "Eastern"), +(NULL, 1190, "N", "Northern"), +(NULL, 1190, "S", "Southern"); + +UPDATE `civicrm_state_province` SET `name`='Uttarakhand', `abbreviation`='UT' WHERE `name` = 'Uttaranchal' AND `abbreviation`='UL'; +UPDATE `civicrm_state_province` SET `name`='Yunlin County' WHERE `name` = 'Yunlin Conuty'; +UPDATE `civicrm_country` SET `name`='Palestine, State of' WHERE `name` = 'Palestinian Territory'; +UPDATE `civicrm_country` SET `name`='Virgin Islands, British' WHERE `name` = 'Virgin Islands,British'; diff --git a/xml/templates/civicrm_country.tpl b/xml/templates/civicrm_country.tpl index 706442608c..5f5ed762c2 100644 --- a/xml/templates/civicrm_country.tpl +++ b/xml/templates/civicrm_country.tpl @@ -72,7 +72,7 @@ INSERT INTO civicrm_country (id, name,iso_code,region_id,is_province_abbreviated INSERT INTO civicrm_country (id, name,iso_code,region_id,is_province_abbreviated) VALUES("1028", "Bouvet Island", "BV", "1", "0"); INSERT INTO civicrm_country (id, name,iso_code,region_id,is_province_abbreviated) VALUES("1029", "Brazil", "BR", "2", "0"); INSERT INTO civicrm_country (id, name,iso_code,region_id,is_province_abbreviated) VALUES("1030", "British Indian Ocean Territory", "IO", "4", "0"); -INSERT INTO civicrm_country (id, name,iso_code,region_id,is_province_abbreviated) VALUES("1031", "Virgin Islands,British", "VG", "2", "0"); +INSERT INTO civicrm_country (id, name,iso_code,region_id,is_province_abbreviated) VALUES("1031", "Virgin Islands, British", "VG", "2", "0"); INSERT INTO civicrm_country (id, name,iso_code,region_id,is_province_abbreviated) VALUES("1032", "Brunei Darussalam", "BN", "4", "0"); INSERT INTO civicrm_country (id, name,iso_code,region_id,is_province_abbreviated) VALUES("1033", "Bulgaria", "BG", "1", "0"); INSERT INTO civicrm_country (id, name,iso_code,region_id,is_province_abbreviated) VALUES("1034", "Burkina Faso", "BF", "5", "0"); @@ -205,7 +205,7 @@ INSERT INTO civicrm_country (id, name,iso_code,region_id,is_province_abbreviated INSERT INTO civicrm_country (id, name,iso_code,region_id,is_province_abbreviated) VALUES("1162", "Oman", "OM", "3", "0"); INSERT INTO civicrm_country (id, name,iso_code,region_id,is_province_abbreviated) VALUES("1163", "Pakistan", "PK", "4", "0"); INSERT INTO civicrm_country (id, name,iso_code,region_id,is_province_abbreviated) VALUES("1164", "Palau", "PW", "4", "0"); -INSERT INTO civicrm_country (id, name,iso_code,region_id,is_province_abbreviated) VALUES("1165", "Palestinian Territory", "PS", "3", "0"); +INSERT INTO civicrm_country (id, name,iso_code,region_id,is_province_abbreviated) VALUES("1165", "Palestine, State of", "PS", "3", "0"); INSERT INTO civicrm_country (id, name,iso_code,region_id,is_province_abbreviated) VALUES("1166", "Panama", "PA", "2", "0"); INSERT INTO civicrm_country (id, name,iso_code,region_id,is_province_abbreviated) VALUES("1167", "Papua New Guinea", "PG", "4", "0"); INSERT INTO civicrm_country (id, name,iso_code,region_id,is_province_abbreviated) VALUES("1168", "Paraguay", "PY", "2", "0"); diff --git a/xml/templates/civicrm_state_province.tpl b/xml/templates/civicrm_state_province.tpl index b7732e800f..fa453dc469 100644 --- a/xml/templates/civicrm_state_province.tpl +++ b/xml/templates/civicrm_state_province.tpl @@ -126,7 +126,7 @@ INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (1222, 1101, "SK", "Sikkim"), (1223, 1101, "TN", "Tamil Nadu"), (1224, 1101, "TR", "Tripura"), -(1225, 1101, "UL", "Uttaranchal"), +(1225, 1101, "UT", "Uttarakhand"), (1226, 1101, "UP", "Uttar Pradesh"), (1227, 1101, "WB", "West Bengal"), (1228, 1101, "AN", "Andaman and Nicobar Islands"), @@ -3310,7 +3310,7 @@ INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (4860, 1208, "TPQ", "Taipei County"), (4861, 1208, "TTT", "Taitung County"), (4862, 1208, "TAO", "Taoyuan County"), -(4863, 1208, "YUN", "Yunlin Conuty"), +(4863, 1208, "YUN", "Yunlin County"), (4864, 1208, "KEE", "Keelung City"), (4865, 1210, "01", "Arusha"), (4866, 1210, "02", "Dar-es-Salaam"), @@ -4064,4 +4064,17 @@ INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES (NULL, 1112, "44", "Uasin Gishu"), (NULL, 1112, "45", "Vihiga"), (NULL, 1112, "46", "Wajir"), -(NULL, 1112, "47", "West Pokot"); +(NULL, 1112, "47", "West Pokot"), + +-- CRM-19993 Fixes for ISO compliance with countries and counties +-- Add states for: India, Ghana, Sierra Leone, Saint Kitts & Nevis +(NULL, 1101, "CH", "Chandigarh"), +(NULL, 1083, "CP", "Central"), +(NULL, 1083, "EP", "Eastern"), +(NULL, 1083, "NP", "Northern"), +(NULL, 1083, "WP", "Western"), +(NULL, 1181, "K", "Saint Kitts"), +(NULL, 1181, "N", "Nevis"), +(NULL, 1190, "E", "Eastern"), +(NULL, 1190, "N", "Northern"), +(NULL, 1190, "S", "Southern"); -- 2.25.1