diff --git a/app/config/collections/platform.php b/app/config/collections/platform.php index d02b8d2ca3..c335a13471 100644 --- a/app/config/collections/platform.php +++ b/app/config/collections/platform.php @@ -1842,7 +1842,7 @@ $platformCollections = [ '$id' => ID::custom('personalAccessToken'), 'type' => Database::VAR_TEXT, 'format' => '', - 'size' => 0, + 'size' => 65535, 'signed' => true, 'required' => false, 'default' => null, @@ -1864,7 +1864,7 @@ $platformCollections = [ '$id' => ID::custom('personalRefreshToken'), 'type' => Database::VAR_TEXT, 'format' => '', - 'size' => 0, + 'size' => 65535, 'signed' => true, 'required' => false, 'default' => null, diff --git a/src/Appwrite/Migration/Version/V25.php b/src/Appwrite/Migration/Version/V25.php index 17ed49b73d..c26db65002 100644 --- a/src/Appwrite/Migration/Version/V25.php +++ b/src/Appwrite/Migration/Version/V25.php @@ -74,7 +74,7 @@ class V25 extends Migration if ($collectionType === 'console') { foreach (['personalAccessToken', 'personalRefreshToken'] as $attribute) { try { - $this->dbForProject->updateAttribute($id, $attribute, type: Database::VAR_TEXT, size: 0); + $this->dbForProject->updateAttribute($id, $attribute, type: Database::VAR_TEXT, size: Database::MAX_TEXT_BYTES); } catch (Throwable $th) { Console::warning("Failed to convert attribute \"{$attribute}\" to text in collection {$id}: {$th->getMessage()}"); }