From ff900fde801766bd0aaeff39609f0055c37b22e9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Tue, 22 Jun 2010 12:42:26 +0200 Subject: [PATCH] A few fixes in DB upgrade scripts. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- upgrade/account/20_naming_convention.sql | 2 +- upgrade/account/{99_insertion.sql => 30_insertion.sql} | 0 upgrade/account/{30_xnet_groups.sql => 40_xnet_groups.sql} | 0 upgrade/newdirectory-0.0.1/09_education.sql | 2 +- upgrade/newdirectory-0.0.1/15_addresses.sql | 6 +++--- 5 files changed, 5 insertions(+), 5 deletions(-) rename upgrade/account/{99_insertion.sql => 30_insertion.sql} (100%) rename upgrade/account/{30_xnet_groups.sql => 40_xnet_groups.sql} (100%) 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); -- 2.1.4