From cfed14a3787978b957a5bd0bbc9a5c2dffde4d90 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Fri, 8 Mar 2024 21:40:52 +0100 Subject: [PATCH] Fix stats migration --- src/Appwrite/Migration/Version/V20.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Appwrite/Migration/Version/V20.php b/src/Appwrite/Migration/Version/V20.php index 4f547b923..ef55de0b3 100644 --- a/src/Appwrite/Migration/Version/V20.php +++ b/src/Appwrite/Migration/Version/V20.php @@ -180,6 +180,15 @@ class V20 extends Migration Console::warning("'type' from {$id}: {$th->getMessage()}"); } + try { + /** + * Ensure 'time' attribute is not required + */ + $this->projectDB->updateAttribute($id, 'time', required: false); + } catch (Throwable $th) { + Console::warning("'time' from {$id}: {$th->getMessage()}"); + } + try { $this->projectDB->purgeCachedCollection($id); } catch (Throwable $th) {