mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
Merge pull request #13132 from appwrite/fix/vcs-token-columns-text-type
fix(vcs): store installation tokens as text instead of sized string
This commit is contained in:
2 files changed
+6
-6
No files matched your search
@@ -1840,9 +1840,9 @@ $platformCollections = [
|
||||
],
|
||||
[
|
||||
'$id' => ID::custom('personalAccessToken'),
|
||||
'type' => Database::VAR_STRING,
|
||||
'type' => Database::VAR_TEXT,
|
||||
'format' => '',
|
||||
'size' => 2048,
|
||||
'size' => 65535,
|
||||
'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' => 65535,
|
||||
'signed' => true,
|
||||
'required' => false,
|
||||
'default' => null,
|
||||
|
||||
@@ -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: Database::MAX_TEXT_BYTES);
|
||||
} 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()}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user