mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
fix(vcs): size the token columns as every other text column is
A text column is capped at 65535 bytes whatever size it declares, and 0 declares no cap of its own, so both store the same tokens. Every other text column in these configs states the cap it holds, and these two now read the same way.
This commit is contained in:
1 parent
1082973fdd
commit
998e7a11bf
2 files changed
+3
-3
No files matched your search
@@ -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,
|
||||
|
||||
@@ -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()}");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user