fix(vcs): store installation tokens as text instead of sized string

This commit is contained in:
harsh mahajan committed 2026-08-07 15:03:57 +05:30
1 parent b21608ad47
commit 1082973fdd
2 files changed
+6 -6

No files matched your search

+4 -4
View File
@@ -1840,9 +1840,9 @@ $platformCollections = [
],
[
'$id' => ID::custom('personalAccessToken'),
'type' => Database::VAR_STRING,
'type' => Database::VAR_TEXT,
'format' => '',
'size' => 2048,
'size' => 0,
'signed' => true,
'required' => false,
'default' => null,
@@ -1862,9 +1862,9 @@ $platformCollections = [
],
[
'$id' => ID::custom('personalRefreshToken'),
'type' => Database::VAR_STRING,
'type' => Database::VAR_TEXT,
'format' => '',
'size' => 2048,
'size' => 0,
'signed' => true,
'required' => false,
'default' => null,
+2 -2
View File
@@ -74,9 +74,9 @@ class V25 extends Migration
if ($collectionType === 'console') {
foreach (['personalAccessToken', 'personalRefreshToken'] as $attribute) {
try {
$this->dbForProject->updateAttribute($id, $attribute, size: 2048);
$this->dbForProject->updateAttribute($id, $attribute, type: Database::VAR_TEXT, size: 0);
} catch (Throwable $th) {
Console::warning("Failed to resize attribute \"{$attribute}\" in collection {$id}: {$th->getMessage()}");
Console::warning("Failed to convert attribute \"{$attribute}\" to text in collection {$id}: {$th->getMessage()}");
}
}
}