From 4c5eaaa502772bb734d971490f0029a3bfd84a61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Tue, 14 Mar 2023 19:49:11 +0100 Subject: [PATCH] Remove leftover break --- src/Appwrite/Migration/Version/V17.php | 56 +++++++++++++------------- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/src/Appwrite/Migration/Version/V17.php b/src/Appwrite/Migration/Version/V17.php index 217e07f2b3..59c57ff794 100644 --- a/src/Appwrite/Migration/Version/V17.php +++ b/src/Appwrite/Migration/Version/V17.php @@ -81,37 +81,35 @@ class V17 extends Migration Console::warning("'mimeType' from {$id}: {$th->getMessage()}"); } - break; + try { + /** + * Delete 'endTime' attribute (use startTime+duration if needed) + */ + $this->projectDB->deleteAttribute($id, 'endTime'); + $this->projectDB->deleteCachedCollection($id); + } catch (\Throwable $th) { + Console::warning("'endTime' from {$id}: {$th->getMessage()}"); + } - try { - /** - * Delete 'endTime' attribute (use startTime+duration if needed) - */ - $this->projectDB->deleteAttribute($id, 'endTime'); - $this->projectDB->deleteCachedCollection($id); - } catch (\Throwable $th) { - Console::warning("'endTime' from {$id}: {$th->getMessage()}"); - } + try { + /** + * Rename 'outputPath' to 'path' + */ + $this->projectDB->renameAttribute($id, 'outputPath', 'path'); + $this->projectDB->deleteCachedCollection($id); + } catch (\Throwable $th) { + Console::warning("'path' from {$id}: {$th->getMessage()}"); + } - try { - /** - * Rename 'outputPath' to 'path' - */ - $this->projectDB->renameAttribute($id, 'outputPath', 'path'); - $this->projectDB->deleteCachedCollection($id); - } catch (\Throwable $th) { - Console::warning("'path' from {$id}: {$th->getMessage()}"); - } - - try { - /** - * Create 'deploymentInternalId' attribute - */ - $this->createAttributeFromCollection($this->projectDB, $id, 'deploymentInternalId'); - $this->projectDB->deleteCachedCollection($id); - } catch (\Throwable $th) { - Console::warning("'deploymentInternalId' from {$id}: {$th->getMessage()}"); - } + try { + /** + * Create 'deploymentInternalId' attribute + */ + $this->createAttributeFromCollection($this->projectDB, $id, 'deploymentInternalId'); + $this->projectDB->deleteCachedCollection($id); + } catch (\Throwable $th) { + Console::warning("'deploymentInternalId' from {$id}: {$th->getMessage()}"); + } break; case 'stats':