From: Stéphane Jacob Date: Tue, 22 Jun 2010 10:42:26 +0000 (+0200) Subject: A few fixes in DB upgrade scripts. X-Git-Tag: xorg/1.0.0~107 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=ff900fde801766bd0aaeff39609f0055c37b22e9;p=platal.git A few fixes in DB upgrade scripts. Signed-off-by: Stéphane Jacob --- diff --git a/upgrade/account/20_naming_convention.sql b/upgrade/account/20_naming_convention.sql index c5cf76c..35a98dc 100644 --- a/upgrade/account/20_naming_convention.sql +++ b/upgrade/account/20_naming_convention.sql @@ -73,7 +73,7 @@ CHANGE COLUMN uid pid INT(11) NOT NULL; # group ALTER TABLE group_announces -CHANGE COLUMN user_id uid INT(11) NOT NULL; +CHANGE COLUMN user_id uid INT(11) NOT NULL, CHANGE COLUMN peremption expiration DATE NOT NULL; ALTER TABLE group_announces_read CHANGE COLUMN user_id uid INT(11) NOT NULL; diff --git a/upgrade/account/99_insertion.sql b/upgrade/account/30_insertion.sql similarity index 100% rename from upgrade/account/99_insertion.sql rename to upgrade/account/30_insertion.sql diff --git a/upgrade/account/30_xnet_groups.sql b/upgrade/account/40_xnet_groups.sql similarity index 100% rename from upgrade/account/30_xnet_groups.sql rename to upgrade/account/40_xnet_groups.sql diff --git a/upgrade/newdirectory-0.0.1/09_education.sql b/upgrade/newdirectory-0.0.1/09_education.sql index c0bfd58..058ad93 100644 --- a/upgrade/newdirectory-0.0.1/09_education.sql +++ b/upgrade/newdirectory-0.0.1/09_education.sql @@ -153,7 +153,7 @@ SET abbreviation = 'Sciences Po', name = 'Institut d\'Études Politiques de Pari WHERE name = 'IEP Paris'; UPDATE profile_education_enum SET abbreviation = 'Sciences Po Aix', name = 'Institut d\'Études Politiques d\'Aix-en-Provence' -WHERE name = 'IEP Aix' +WHERE name = 'IEP Aix'; UPDATE profile_education_enum SET abbreviation = 'EHESS', name = 'École des Hautes Études en Sciences Sociales' WHERE name = 'EHESS'; diff --git a/upgrade/newdirectory-0.0.1/15_addresses.sql b/upgrade/newdirectory-0.0.1/15_addresses.sql index a9c9486..0d9ef47 100644 --- a/upgrade/newdirectory-0.0.1/15_addresses.sql +++ b/upgrade/newdirectory-0.0.1/15_addresses.sql @@ -35,8 +35,8 @@ CREATE TABLE profile_addresses ( ) ENGINE=InnoDB, CHARSET=utf8; INSERT INTO profile_addresses (pid, id, postalCode, updateTime, pub, comment, latitude, longitude, - IF(countryId = '' OR countryId = '00', NULL, countryId), type, flags) - SELECT uid, adrid, postcode, datemaj, pub, NULL, glat, glng, country, + countryId, type, flags) + SELECT uid, adrid, postcode, datemaj, pub, NULL, glat, glng, IF(country = '' OR country = '00', NULL, country), IF(FIND_IN_SET('pro', 'statut'), 'job', 'home'), CONCAT(IF(FIND_IN_SET('res-secondaire', 'statut'), 'secondary,', ''), IF(FIND_IN_SET('courrier', 'statut'), 'mail,', ''), @@ -287,7 +287,7 @@ INSERT INTO geoloc_countries (iso_3166_1_a2, iso_3166_1_a3, iso_3166_1_num, wor WHEN "ER" THEN 232 ELSE n3 END, worldrgn, pays, country, capital, nat, - phoneprf, phoneformat, t.code + phoneprf, '', t.code FROM #x4dat#.geoloc_pays AS g INNER JOIN tmp_update_geoloc_pays AS t ON (t.a2 = g.a2);