mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
sessions
This commit is contained in:
@@ -166,10 +166,11 @@ class V20 extends Migration
|
||||
foreach ($stats as $stat) {
|
||||
var_dump("{$stat['time']}_{$stat['period']}_{$to}");
|
||||
$id = \md5("{$stat['time']}_{$stat['period']}_{$to}");
|
||||
$oldId = $stat->getId();
|
||||
$stat->setAttribute('$id', $id);
|
||||
$stat->setAttribute('metric', $to);
|
||||
console::log("updating metric {$from} to {$to}");
|
||||
$this->projectDB->updateDocument('stats', $stat->getId(), $stat);
|
||||
$this->projectDB->updateDocument('stats', $oldId, $stat);
|
||||
}
|
||||
|
||||
$latestDocument = !empty(array_key_last($stats)) ? $stats[array_key_last($stats)] : null;
|
||||
|
||||
Reference in New Issue
Block a user