mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
cache collection attr migration
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user