mirror of
https://github.com/sigmasternchen/mobmash.click
synced 2025-03-15 16:19:02 +00:00
19 lines
No EOL
417 B
PHP
19 lines
No EOL
417 B
PHP
<?php
|
|
|
|
function removeOldAuditLogs() {
|
|
global $pdo;
|
|
$pdo->exec("DELETE FROM mm_audit_log WHERE time < (CURRENT_TIMESTAMP - INTERVAL '6 months')");
|
|
}
|
|
|
|
|
|
function removeOldSessionIDs() {
|
|
global $pdo;
|
|
$pdo->exec(<<<EOF
|
|
UPDATE mm_matches
|
|
SET session = NULL
|
|
WHERE
|
|
created < (CURRENT_TIMESTAMP - INTERVAL '6 months')
|
|
AND session IS NOT NULL
|
|
EOF
|
|
);
|
|
} |