improved start page performance; top rating statistics was very slow

needs a new database field with manual init, see db-changes.txt !

and fixed another recommendation bug:
- recommendations will not get lost when a user edits one of multiple logs
  for the same cache
This commit is contained in:
following
2012-08-24 23:58:18 +02:00
parent 038719fa3c
commit c32a4b06ff
6 changed files with 34 additions and 39 deletions
+7
View File
@@ -668,6 +668,13 @@
INSERT IGNORE INTO `removed_objects` (`localId`, `uuid`, `type`, `node`) VALUES (OLD.`id`, OLD.`uuid`, 1, OLD.`node`);
END;");
sql_dropTrigger('cacheRatingBeforeInsert');
sql("CREATE TRIGGER `cacheRatingBeforeInsert` BEFORE INSERT ON `cache_rating`
FOR EACH ROW
BEGIN
SET NEW.`rating_date` = NOW();
END;");
sql_dropTrigger('cacheRatingAfterInsert');
sql("CREATE TRIGGER `cacheRatingAfterInsert` AFTER INSERT ON `cache_rating`
FOR EACH ROW