From 86c104d10f56354b6f1ee516aa116ee678bb3847 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Mon, 21 Jun 2010 22:52:31 +0200 Subject: [PATCH] Fixes building history of watch_profile table. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- upgrade/newdirectory-0.0.1/01_nationalities.sql | 6 ++++++ upgrade/newdirectory-0.0.1/02_networking.sql | 16 ++++++++-------- upgrade/newdirectory-0.0.1/06_education.sql | 15 ++++++++------- upgrade/newdirectory-0.0.1/07_corps.sql | 7 ++++--- upgrade/newdirectory-0.0.1/14_watchnames.sql | 16 ++++++++-------- 5 files changed, 34 insertions(+), 26 deletions(-) create mode 100644 upgrade/newdirectory-0.0.1/01_nationalities.sql diff --git a/upgrade/newdirectory-0.0.1/01_nationalities.sql b/upgrade/newdirectory-0.0.1/01_nationalities.sql new file mode 100644 index 0000000..54db8ca --- /dev/null +++ b/upgrade/newdirectory-0.0.1/01_nationalities.sql @@ -0,0 +1,6 @@ +ALTER TABLE watch_profile + MODIFY field ENUM('nom', 'freetext', 'mobile', 'nationality1', 'nationality2', 'nationality3', + 'nick', 'web','appli1', 'appli2', 'addresses', 'section', + 'binets', 'medals', 'cv', 'jobs', 'photo'); + +# vim:set syntax=mysql: diff --git a/upgrade/newdirectory-0.0.1/02_networking.sql b/upgrade/newdirectory-0.0.1/02_networking.sql index 3aaa122..57f636c 100644 --- a/upgrade/newdirectory-0.0.1/02_networking.sql +++ b/upgrade/newdirectory-0.0.1/02_networking.sql @@ -31,16 +31,16 @@ INSERT INTO `profile_networking` (`pid`, `nwid`, `network_type`, `address`, `pub WHERE `profile_web` <> ""; -- Modify watch_profile to update 'field' from web to networking -ALTER TABLE `watch_profile` - MODIFY `field` enum('nom', 'freetext', 'mobile', 'nationalite', 'nick', - 'web', 'networking', 'appli1', 'appli2', 'addresses', - 'section', 'binets', 'medals', 'cv', 'jobs', 'photo'); +ALTER TABLE watch_profile + MODIFY field ENUM('nom', 'freetext', 'mobile', 'nationality1', 'nationality2', 'nationality3', + 'nick', 'web', 'networking', 'appli1', 'appli2', 'addresses', 'section', + 'binets', 'medals', 'cv', 'jobs', 'photo'); UPDATE `watch_profile` SET `field` = 'networking' WHERE `field` = 'web'; -ALTER TABLE `watch_profile` - MODIFY `field` enum('nom', 'freetext', 'mobile', 'nationalite', 'nick', - 'networking', 'appli1', 'appli2', 'addresses', - 'section', 'binets', 'medals', 'cv', 'jobs', 'photo'); +ALTER TABLE watch_profile + MODIFY field ENUM('nom', 'freetext', 'mobile', 'nationality1', 'nationality2', 'nationality3', + 'nick', 'networking', 'appli1', 'appli2', 'addresses', 'section', + 'binets', 'medals', 'cv', 'jobs', 'photo'); # vim:set syntax=mysql: diff --git a/upgrade/newdirectory-0.0.1/06_education.sql b/upgrade/newdirectory-0.0.1/06_education.sql index dc55947..ef9ecfc 100644 --- a/upgrade/newdirectory-0.0.1/06_education.sql +++ b/upgrade/newdirectory-0.0.1/06_education.sql @@ -85,19 +85,20 @@ INSERT IGNORE INTO watch_profile (uid, ts, field) FROM watch_profile WHERE field = 'appli2'; -ALTER TABLE watch_profile MODIFY field enum('nom', 'freetext', 'mobile', 'nationalite', 'nationalite2', - 'nationalite3', 'nick', 'web', 'networking', 'appli1', 'appli2', - 'edus', 'addresses', 'section', 'binets', 'medals', 'cv', 'jobs', - 'photo'); +ALTER TABLE watch_profile + MODIFY field ENUM('nom', 'freetext', 'mobile', 'nationality1', 'nationality2', 'nationality3', + 'nick', 'networking', 'appli1', 'appli2', 'edus', 'addresses', 'section', + 'binets', 'medals', 'cv', 'jobs', 'photo'); UPDATE watch_profile SET field = 'edus' WHERE field = 'appli1'; DELETE FROM watch_profile WHERE field = 'appli2'; -ALTER TABLE watch_profile MODIFY field enum('nom', 'freetext', 'mobile', 'nationalite', 'nationalite2', - 'nationalite3', 'nick', 'web', 'networking', 'edus', 'addresses', - 'section', 'binets', 'medals', 'cv', 'jobs', 'photo'); +ALTER TABLE watch_profile + MODIFY field ENUM('nom', 'freetext', 'mobile', 'nationality1', 'nationality2', 'nationality3', + 'nick', 'networking', 'edus', 'addresses', 'section', 'binets', 'medals', + 'cv', 'jobs', 'photo'); # vim:set syntax=mysql: diff --git a/upgrade/newdirectory-0.0.1/07_corps.sql b/upgrade/newdirectory-0.0.1/07_corps.sql index 80f80bc..dcdf08f 100644 --- a/upgrade/newdirectory-0.0.1/07_corps.sql +++ b/upgrade/newdirectory-0.0.1/07_corps.sql @@ -656,8 +656,9 @@ INSERT IGNORE INTO profile_corps_enum (abbreviation, name, still_exists) ("INSEE", "Administrateurs de l'INSEE", 1), ("Off", "Officiers des Armées", 1); -ALTER TABLE watch_profile MODIFY field ENUM('nom', 'freetext', 'mobile', 'nationalite', 'nationalite2', - 'nationalite3', 'nick', 'web', 'networking', 'edus', 'addresses', - 'section', 'binets', 'medals', 'cv', 'jobs', 'photo', 'corps'); +ALTER TABLE watch_profile + MODIFY field ENUM('nom', 'freetext', 'mobile', 'nationality1', 'nationality2', 'nationality3', + 'nick', 'networking', 'edus', 'addresses', 'section', 'binets', 'medals', + 'cv', 'jobs', 'photo', 'corps'); -- vim:set syntax=mysql: diff --git a/upgrade/newdirectory-0.0.1/14_watchnames.sql b/upgrade/newdirectory-0.0.1/14_watchnames.sql index 04b3483..db8c667 100644 --- a/upgrade/newdirectory-0.0.1/14_watchnames.sql +++ b/upgrade/newdirectory-0.0.1/14_watchnames.sql @@ -1,13 +1,13 @@ -ALTER TABLE watch_profile MODIFY field enum('search_names', 'nom', 'freetext', 'mobile', 'nationalite', - 'nationalite2', 'nationalite3', 'nick', 'web', 'networking', - 'edus', 'addresses', 'section', 'binets', 'medals', 'cv', - 'jobs', 'photo', 'corps'); +ALTER TABLE watch_profile + MODIFY field ENUM('search_names', 'nom', 'freetext', 'mobile', 'nationality1', 'nationality2', 'nationality3', + 'nick', 'networking', 'edus', 'addresses', 'section', 'binets', 'medals', + 'cv', 'jobs', 'photo', 'corps'); UPDATE watch_profile SET field = 'search_names' WHERE field = 'nom' OR field = 'nick'; -ALTER TABLE watch_profile MODIFY field enum('search_names', 'freetext', 'mobile', 'nationalite', - 'nationalite2', 'nationalite3', 'web', 'networking','edus', - 'addresses', 'section', 'binets', 'medals', 'cv', 'jobs', - 'photo', 'corps'); +ALTER TABLE watch_profile + MODIFY field ENUM('search_names', 'freetext', 'mobile', 'nationality1', 'nationality2', 'nationality3', + 'nick', 'networking', 'edus', 'addresses', 'section', 'binets', 'medals', + 'cv', 'jobs', 'photo', 'corps'); # vim:set syntax=mysql: -- 2.1.4