From: Stéphane Jacob Date: Tue, 1 Jun 2010 14:23:00 +0000 (+0200) Subject: Fixes empty nationalities. X-Git-Tag: xorg/1.0.0~205 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=eb20905492287874f616866d0541707cfc40bd00;p=platal.git Fixes empty nationalities. Signed-off-by: Stéphane Jacob --- diff --git a/upgrade/account/99_insertion.sql b/upgrade/account/99_insertion.sql index 10a2fe4..cdfb7a3 100644 --- a/upgrade/account/99_insertion.sql +++ b/upgrade/account/99_insertion.sql @@ -60,8 +60,8 @@ insert into profiles IF(q.profile_freetext_pub = 'public', 'public', 'private') AS freetext_pub, IF(q.profile_medals_pub = 'public', 'public', 'private') AS medals_pub, IF(q.emails_alias_pub = 'public', 'public', 'private') AS alias_pub, - IF(u.nationalite = '' OR u.nationalite IS NULL, NULL, u.nationalite) AS nationality1, - NULL AS nationality2, NULL AS nationality3, u.date AS last_change + IF(u.nationalite = '' OR u.nationalite IS NULL or u.nationalite = '00' or u.nationalite = '0', NULL, u.nationalite) AS nationality1, + NULL AS nationality2, NULL AS nationality3, NULL AS email_directory, u.date AS last_change from #x4dat#.auth_user_md5 AS u left join #x4dat#.auth_user_quick AS q ON (u.user_id = q.user_id) where u.hruid is not null; diff --git a/upgrade/newdirectory-0.0.1/16_countries.sql b/upgrade/newdirectory-0.0.1/16_countries.sql index a302a0a..c12b9e9 100644 --- a/upgrade/newdirectory-0.0.1/16_countries.sql +++ b/upgrade/newdirectory-0.0.1/16_countries.sql @@ -1,7 +1,7 @@ ALTER TABLE geoloc_countries MODIFY COLUMN phoneFormat VARCHAR(255) NOT NULL DEFAULT ""; DELETE FROM geoloc_countries - WHERE iso_3166_1_a2 = "TP" OR iso_3166_1_a2 = "YU"; + WHERE iso_3166_1_a2 = "TP" OR iso_3166_1_a2 = "YU" OR iso_3166_1_a2 = "00"; INSERT INTO geoloc_countries (iso_3166_1_a2, iso_3166_1_a3, iso_3166_1_num, worldRegion, country, countryFR, capital, nationalityFR, @@ -647,7 +647,7 @@ UPDATE geoloc_countries WHERE iso_3166_1_a2 = "PY"; UPDATE geoloc_countries - SET nationalityFR = NULL, belongsTo = "US" + SET nationalityFR = "Porto-ricain", belongsTo = "US" WHERE iso_3166_1_a2 = "PR"; UPDATE geoloc_countries @@ -659,7 +659,7 @@ UPDATE geoloc_countries WHERE iso_3166_1_a2 = "RW"; UPDATE geoloc_countries - SET nationalityFR = NULL, capital = "" + SET nationalityFR = "Saharien occidental", capital = "" WHERE iso_3166_1_a2 = "EH"; UPDATE geoloc_countries