From: Stéphane Jacob Date: Sun, 27 Mar 2011 21:16:09 +0000 (+0200) Subject: Removes meaningless empty fields. X-Git-Tag: xorg/1.1.1~37^2~43 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=e603b9c344f281b7d8da1a169d4122a82b5dd966;p=platal.git Removes meaningless empty fields. Signed-off-by: Stéphane Jacob --- diff --git a/upgrade/1.1.0/xx_01_clean_db.sql b/upgrade/1.1.0/xx_01_clean_db.sql new file mode 100644 index 0000000..bce75fb --- /dev/null +++ b/upgrade/1.1.0/xx_01_clean_db.sql @@ -0,0 +1,10 @@ +-- Deletes empty mentor expertise. +DELETE FROM profile_mentor WHERE expertise IS NULL OR expertise = ''; +-- Deletes empty jobs. +DELETE FROM profile_job WHERE (jobid IS NULL OR jobid = '') AND description = '' AND url = '' AND email = ''; +-- Deletes empty educations. +DELETE FROM profile_education WHERE degreeid IS NULL AND eduid IS NULL AND program = ''; +-- Deletes empty addresses. +DELETE FROM profile_addresses WHERE text IS NULL OR text = ''; + +-- vim:set syntax=mysql: