add: default to V20 migration.

This commit is contained in:
ItzNotABug 2024-06-20 14:14:21 +05:30
parent 4fd94fd7b1
commit eb36ae5c61

View file

@ -336,6 +336,32 @@ class V20 extends Migration
Console::warning("Purge cache from {$id}: {$th->getMessage()}");
}
break;
case 'topics':
try {
$this->projectDB->updateAttributeDefault($id, 'emailTotal', 0);
} catch (Throwable $th) {
Console::warning("'topics' from {$id}: {$th->getMessage()}");
}
try {
$this->projectDB->updateAttributeDefault($id, 'pushTotal', 0);
} catch (Throwable $th) {
Console::warning("'topics' from {$id}: {$th->getMessage()}");
}
try {
$this->projectDB->updateAttributeDefault($id, 'smsTotal', 0);
} catch (Throwable $th) {
Console::warning("'topics' from {$id}: {$th->getMessage()}");
}
try {
$this->projectDB->purgeCachedCollection($id);
} catch (Throwable $th) {
Console::warning("Purge cache from {$id}: {$th->getMessage()}");
}
break;
}