Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-19993 Fixes for ISO compliance with countries and counties #9951

Merged
merged 1 commit into from
Mar 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions CRM/Upgrade/Incremental/sql/4.7.18.mysql.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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';
4 changes: 2 additions & 2 deletions xml/templates/civicrm_country.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down
19 changes: 16 additions & 3 deletions xml/templates/civicrm_state_province.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down Expand Up @@ -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"),
Expand Down Expand Up @@ -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");