From e603b9c344f281b7d8da1a169d4122a82b5dd966 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Sun, 27 Mar 2011 23:16:09 +0200 Subject: [PATCH] Removes meaningless empty fields. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- upgrade/1.1.0/xx_01_clean_db.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 upgrade/1.1.0/xx_01_clean_db.sql 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: -- 2.1.4