fix: teams total sum renaming

This commit is contained in:
Torsten Dittmann 2022-03-02 08:42:34 +01:00
parent c91abb5d60
commit 7848f76f98

View file

@ -213,6 +213,18 @@ class V12 extends Migration
*/
$this->createCollection('builds');
break;
case 'functions':
try {
/**
* Rename tag to deployment
*/
$this->projectDB->renameAttribute($id, 'sum', 'total');
} catch (\Throwable $th) {
Console::warning("'total' from {$id}: {$th->getMessage()}");
}
break;
}
usleep(100000);
@ -495,13 +507,6 @@ class V12 extends Migration
break;
case 'teams':
/**
* Rename sum to total
*/
if (empty($document->getAttribute('total'))) {
$document->setAttribute('total', $document->getAttribute('sum'));
}
/**
* Populate search string from Migration to 0.12.
*/