1
0
Fork 0
mirror of synced 2024-09-30 17:26:48 +13:00

Merge pull request #7575 from appwrite/cache-attr-migrations

cache collection attr migration
This commit is contained in:
Christy Jacob 2024-02-13 12:09:01 +05:30 committed by GitHub
commit f0f34e6572
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -129,6 +129,24 @@ class V20 extends Migration
$this->createCollection('targets');
$this->createCollection('challenges');
break;
case 'cache':
// Create resourceType attribute
try {
$this->createAttributeFromCollection($this->projectDB, $id, 'resourceType');
$this->projectDB->purgeCachedCollection($id);
} catch (Throwable $th) {
Console::warning("'resourceType' from {$id}: {$th->getMessage()}");
}
// Create mimeType attribute
try {
$this->createAttributeFromCollection($this->projectDB, $id, 'mimeType');
$this->projectDB->purgeCachedCollection($id);
} catch (Throwable $th) {
Console::warning("'mimeType' from {$id}: {$th->getMessage()}");
}
break;
case 'stats':
try {