diff --git a/src/Appwrite/Migration/Version/V12.php b/src/Appwrite/Migration/Version/V12.php index 3d56f36355..ac7d3aef8a 100644 --- a/src/Appwrite/Migration/Version/V12.php +++ b/src/Appwrite/Migration/Version/V12.php @@ -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. */