From e35c6c3c79de5ccee69354dee4cf161c24377002 Mon Sep 17 00:00:00 2001 From: shimon Date: Tue, 26 Sep 2023 15:00:16 +0300 Subject: [PATCH] usage id update --- src/Appwrite/Migration/Version/V20.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Migration/Version/V20.php b/src/Appwrite/Migration/Version/V20.php index 6d645160b6..152f4781db 100644 --- a/src/Appwrite/Migration/Version/V20.php +++ b/src/Appwrite/Migration/Version/V20.php @@ -135,7 +135,7 @@ class V20 extends Migration /** * inf metric */ - if (str_contains($from, 'total')) { + if (str_contains($from, '.total')) { $query = $this->projectDB->sum('stats', 'value', [ Query::equal('metric', [$from]), Query::equal('period', ['1d']), @@ -168,8 +168,9 @@ class V20 extends Migration $time = date('Y-m-d 00:00', strtotime($stat['time'])); var_dump("{$time}_{$stat['period']}_{$to}"); $id = \md5("{$time}_{$stat['period']}_{$to}"); - var_dump($id); + var_dump($stat->getInternalId()); var_dump($oldId); + var_dump($id); var_dump('------------------'); $stat->setAttribute('$id', $id); $stat->setAttribute('metric', $to);