From 7922b092d3f96bb426554dbe408429cd53420566 Mon Sep 17 00:00:00 2001 From: shimon Date: Thu, 21 Sep 2023 18:25:02 +0300 Subject: [PATCH] migration::V20 --- src/Appwrite/Migration/Version/V20.php | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/Appwrite/Migration/Version/V20.php b/src/Appwrite/Migration/Version/V20.php index 4ab690e6dd..40a8cb2b23 100644 --- a/src/Appwrite/Migration/Version/V20.php +++ b/src/Appwrite/Migration/Version/V20.php @@ -71,28 +71,18 @@ class V20 extends Migration 'region' => 'default', ])); } catch (Duplicate $th) { - var_dump('duplicate'); -// var_dump([ -// 'id' => \md5("null_inf_{$to}"), -// 'from' => $from, -// 'to' => $to, -// ]); + ; } $stats = $this->projectDB->find('stats', [ Query::equal('metric', [$from]), + Query::limit(5000), ]); - var_dump($from); - $cnt = 0; foreach ($stats as $stat) { $stat->setAttribute('metric', $to); - var_dump($cnt . '' . $stat->getId()); $this->projectDB->updateDocument('stats', $stat->getId(), $stat); - $cnt++; } - var_dump($cnt); - var_dump('=================='); } catch (\Throwable $th) { Console::warning("Migrating steps from {$this->projectDB->getDefaultDatabase()}`.`_{$this->project->getInternalId()}_stats:" . $th->getMessage()); }