Removes meaningless empty fields.
authorStéphane Jacob <sj@m4x.org>
Sun, 27 Mar 2011 21:16:09 +0000 (23:16 +0200)
committerStéphane Jacob <sj@m4x.org>
Sun, 27 Mar 2011 21:16:09 +0000 (23:16 +0200)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
upgrade/1.1.0/xx_01_clean_db.sql [new file with mode: 0644]

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 (file)
index 0000000..bce75fb
--- /dev/null
@@ -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: