mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
fix: reviews
This commit is contained in:
parent
1559fec29a
commit
999c2cfac7
1 changed files with 8 additions and 6 deletions
|
|
@ -34,13 +34,13 @@ class V21 extends Migration
|
|||
Console::info('Migrating Collections');
|
||||
$this->migrateCollections();
|
||||
|
||||
Console::info('Migrating Documents');
|
||||
$this->forEachDocument([$this, 'fixDocument']);
|
||||
|
||||
if ($this->project->getInternalId() !== 'console') {
|
||||
Console::info('Migrating Buckets');
|
||||
$this->migrateBuckets();
|
||||
}
|
||||
|
||||
Console::info('Migrating Documents');
|
||||
$this->forEachDocument([$this, 'fixDocument']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -187,15 +187,17 @@ class V21 extends Migration
|
|||
* 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);
|
||||
try {
|
||||
$this->projectDB->updateAttribute($bucketId, 'metadata', size: 75000);
|
||||
} catch (\Throwable $th) {
|
||||
Console::warning("'bucketId' from {$bucketId}: {$th->getMessage()}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue