From 4283671d491ae40f1616aeafa61c6e7b6ff206b7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 4 Dec 2025 22:15:50 +0000 Subject: [PATCH] Add user email attributes migration and fix missing break statement in V23 Co-authored-by: stnguyen90 <1477010+stnguyen90@users.noreply.github.com> --- src/Appwrite/Migration/Version/V23.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Migration/Version/V23.php b/src/Appwrite/Migration/Version/V23.php index c7be832626..64a45fc9b2 100644 --- a/src/Appwrite/Migration/Version/V23.php +++ b/src/Appwrite/Migration/Version/V23.php @@ -139,7 +139,7 @@ class V23 extends Migration } catch (\Throwable $th) { Console::warning("Failed to migration error attribute size in collection {$id}: {$th->getMessage()}"); } - + break; case 'buckets': try { $this->createAttributeFromCollection($this->dbForProject, $id, 'transformations'); @@ -148,6 +148,21 @@ class V23 extends Migration } $this->dbForProject->purgeCachedCollection($id); break; + case 'users': + $attributes = [ + 'emailCanonical', + 'emailIsFree', + 'emailIsDisposable', + 'emailIsCorporate', + 'emailIsCanonical', + ]; + try { + $this->createAttributesFromCollection($this->dbForProject, $id, $attributes); + } catch (\Throwable $th) { + Console::warning('Failed to create attributes "' . \implode(', ', $attributes) . "\" in collection {$id}: {$th->getMessage()}"); + } + $this->dbForProject->purgeCachedCollection($id); + break; default: break; }