[DATABASE] Update "modified" in Managed_DataObject instead of a DBMS trigger
Instead of relying on the MariaDB's ON UPDATE CURRENT_TIMESTAMP trigger update "modified" attributes in Managed_DataObject. Every raw query that needs adjusting is adjusted, as they won't update "modified" automatically anymore. The main goal behind this change is to fix "modified" updates on PostgreSQL.
This commit is contained in:
@@ -109,9 +109,10 @@ if ($feedurl != $oprofile->feeduri || $salmonuri != $oprofile->salmonuri) {
|
||||
$ok = $oprofile->query(
|
||||
<<<END
|
||||
UPDATE ostatus_profile
|
||||
SET feeduri = '{$oprofile->escape($feedurl)}',
|
||||
salmonuri = '{$oprofile->escape($salmonuri)}'
|
||||
WHERE uri = '{$oprofile->escape($uri)}'
|
||||
SET feeduri = {$oprofile->_quote($feedurl)},
|
||||
salmonuri = {$oprofile->_quote($salmonuri)},
|
||||
modified = CURRENT_TIMESTAMP
|
||||
WHERE uri = {$oprofile->_quote($uri)}
|
||||
END
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user