Add new patch to include new synonyms for Swaziland
This commit is contained in:
parent
4fdf9490e3
commit
8920403fbd
1
geocoder/.gitignore
vendored
1
geocoder/.gitignore
vendored
@ -1 +1,2 @@
|
||||
db_dumps/
|
||||
data_patches/
|
||||
|
@ -0,0 +1,9 @@
|
||||
DO $$
|
||||
DECLARE updated INTEGER;
|
||||
BEGIN
|
||||
SELECT count(*) FROM admin0_synonyms WHERE adm0_a3 = 'SWZ' GROUP BY adm0_a3 HAVING count(*) > 0 INTO updated;
|
||||
IF updated = 4 THEN
|
||||
INSERT INTO admin0_synonyms (name, rank, adm0_a3, name_) SELECT 'Eswatini' as name, 6, adm0_a3, 'eswatini' as name_ FROM admin0_synonyms WHERE name_ = 'swaziland';
|
||||
INSERT INTO admin0_synonyms (name, rank, adm0_a3, name_) SELECT 'Kingdom of Eswatini' as name, 7, adm0_a3, 'kingdomofeswatini' as name_ FROM admin0_synonyms WHERE name_ = 'swaziland';
|
||||
END IF;
|
||||
END$$;
|
@ -8,7 +8,8 @@ PATCHES_LIST="20160203_countries_bh_isocode.sql
|
||||
20160622_countries_synonym_congo.sql
|
||||
20171004_merge_corsica_and_france.sql
|
||||
20180117_hsinchu_synonyms.sql
|
||||
20180306_add_ssd_rows_for_south_sudan.sql"
|
||||
20180306_add_ssd_rows_for_south_sudan.sql
|
||||
20181011_add_synonyms_for_swaziland.sql"
|
||||
|
||||
mkdir -p $TARGET_DIR_PATCHES
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user