mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
fix: Increasing buckets metadata
This commit is contained in:
@@ -5772,7 +5772,7 @@ $bucketCollections = [
|
||||
'$id' => ID::custom('metadata'),
|
||||
'type' => Database::VAR_STRING,
|
||||
'format' => '',
|
||||
'size' => 16384, // https://tools.ietf.org/html/rfc4288#section-4.2
|
||||
'size' => 75000, // https://tools.ietf.org/html/rfc4288#section-4.2
|
||||
'signed' => true,
|
||||
'required' => false,
|
||||
'default' => null,
|
||||
|
||||
@@ -36,6 +36,11 @@ class V21 extends Migration
|
||||
|
||||
Console::info('Migrating Documents');
|
||||
$this->forEachDocument([$this, 'fixDocument']);
|
||||
|
||||
if ($this->project->getInternalId() !== 'console') {
|
||||
Console::info('Migrating Buckets');
|
||||
$this->migrateBuckets();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -177,4 +182,20 @@ class V21 extends Migration
|
||||
|
||||
return $document;
|
||||
}
|
||||
|
||||
/**
|
||||
* Migrating Buckets.
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
* @throws PDOException
|
||||
*/
|
||||
private function migrateBuckets()
|
||||
{
|
||||
foreach ($this->documentsIterator('buckets') as $bucket) {
|
||||
$bucketId = 'bucket_' . $bucket['$internalId'];
|
||||
|
||||
$this->projectDB->updateAttribute($bucketId, 'metadata', size: 75000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user