kill orphans
This commit is contained in:
14
update.php
14
update.php
@@ -328,3 +328,17 @@ function update_1033() {
|
||||
`updated` DATETIME NOT NULL
|
||||
) ENGINE = MYISAM DEFAULT CHARSET=utf8;");
|
||||
}
|
||||
|
||||
|
||||
function update_1034() {
|
||||
|
||||
// If you have any of these parent-less posts they can cause problems, and
|
||||
// we need to delete them. You can't see them anyway.
|
||||
// Legitimate items will usually get re-created on the next
|
||||
// pull from the hub.
|
||||
// But don't get rid of a post that may have just come in
|
||||
// and may not yet have the parent id set.
|
||||
|
||||
q("DELETE FROM `item` WHERE `parent` = 0 AND `created` < UTC_TIMESTAMP() - INTERVAL 2 MINUTE");
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user