From ba50075fff46f27a92f23c85503089f55a5813ea Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Thu, 30 Dec 2021 10:51:16 +0100 Subject: [PATCH] fix: migration handle default and requried attributes --- src/Appwrite/Migration/Version/V11.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Appwrite/Migration/Version/V11.php b/src/Appwrite/Migration/Version/V11.php index 0d2b08fc4..7df26f8d9 100644 --- a/src/Appwrite/Migration/Version/V11.php +++ b/src/Appwrite/Migration/Version/V11.php @@ -660,6 +660,10 @@ class V11 extends Migration $size = $type === Database::VAR_STRING ? 65_535 : 0; // Max size of text in MariaDB + if ($required) { + $default = null; + } + $attributes[$key] = [ '$collection' => $collectionId, '$id' => $id,