summaryrefslogtreecommitdiff
path: root/database.cleanup
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2008-12-11 14:12:11 +0100
committerHugues Hiegel <hugues@hiegel.fr>2008-12-11 14:12:11 +0100
commit44e46e5c71af611784143a2ebf1a36042c3302ac (patch)
treed62421b98ae93990763a747cf67d9433c6e0cfb1 /database.cleanup
parentae5ee7a18295b0f50ce2a363d01eed8a45fd9bb5 (diff)
[DB] remove badges variants : script corrections + renaming
Diffstat (limited to 'database.cleanup')
-rw-r--r--database.cleanup17
1 files changed, 0 insertions, 17 deletions
diff --git a/database.cleanup b/database.cleanup
deleted file mode 100644
index 1d3d918..0000000
--- a/database.cleanup
+++ /dev/null
@@ -1,17 +0,0 @@
-
-USE lastfm
-
-
-/**
- * Deletes all entries in badges
- * for each unique username + type
- * where more than one style or color exists
- */
-
-DROP TABLE IF EXISTS tmp ;
-CREATE TEMPORARY TABLE tmp (SELECT username, type, COUNT(username) AS count FROM badges GROUP BY username, type ) ;
-SELECT * FROM tmp WHERE count > 1 ;
-DELETE badges FROM badges, tmp WHERE badges.username = tmp.username AND tmp.count > 1 ;
-DROP TABLE tmp ;
-
-