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:
harsh mahajan committed 2026-08-07 15:22:37 +05:30
1 parent 1082973fdd
commit 998e7a11bf
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -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,
+1 -1
View File
@@ -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()}");
}