mirror of
https://github.com/friendica/friendica
synced 2025-04-26 11:50:11 +00:00
Change key-value table
- Make "k" as primary key - Added "updated_at"
This commit is contained in:
parent
f944a2a620
commit
7c4c409060
5 changed files with 68 additions and 21 deletions
|
@ -89,7 +89,10 @@ class DBKeyValueStorage extends AbstractKeyValueStorage
|
|||
|
||||
$dbValue = ValueConversion::toDbValue($value);
|
||||
|
||||
$return = $this->database->update(self::DB_KEY_VALUE_TABLE, ['v' => $dbValue], ['k' => $offset], true);
|
||||
$return = $this->database->update(self::DB_KEY_VALUE_TABLE, [
|
||||
'v' => $dbValue,
|
||||
'updated_at' => time()
|
||||
], ['k' => $offset], true);
|
||||
|
||||
if (!$return) {
|
||||
throw new \Exception(sprintf('database update failed: %s', $this->database->errorMessage()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue