From b014eda788c63040092b7538c91bbea9b983dd67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Tue, 20 Dec 2022 12:48:11 +0100 Subject: [PATCH] PR review changes --- docker-compose.yml | 2 +- src/Appwrite/Migration/Version/V17.php | 27 +++++++++++++++++++++++--- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8f6d5257e..448a2ba2a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -657,7 +657,7 @@ services: hostname: exc1 <<: *x-logging stop_signal: SIGINT - image: meldiron/appwrite-executor:latest + image: openruntimes/executor:0.2.0 networks: - appwrite - runtimes diff --git a/src/Appwrite/Migration/Version/V17.php b/src/Appwrite/Migration/Version/V17.php index cef4ae071..e6877e722 100644 --- a/src/Appwrite/Migration/Version/V17.php +++ b/src/Appwrite/Migration/Version/V17.php @@ -63,6 +63,7 @@ class V17 extends Migration * Create 'size' attribute */ $this->createAttributeFromCollection($this->projectDB, $id, 'size'); + $this->projectDB->deleteCachedCollection($id); } catch (\Throwable $th) { Console::warning("'size' from {$id}: {$th->getMessage()}"); } @@ -71,10 +72,30 @@ class V17 extends Migration /** * Delete 'endTime' attribute (use startTime+duration if needed) */ - $this->projectDB->deleteAttribute($id, 'startTime'); - $this->createAttributeFromCollection($this->projectDB, $id, 'startTime'); + $this->projectDB->deleteAttribute($id, 'endTime'); + $this->projectDB->deleteCachedCollection($id); } catch (\Throwable $th) { - Console::warning("'startTime' from {$id}: {$th->getMessage()}"); + 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 { + /** + * Create 'size' + */ + $this->createAttributeFromCollection($this->projectDB, $id, 'size'); + $this->projectDB->deleteCachedCollection($id); + } catch (\Throwable $th) { + Console::warning("'size' from {$id}: {$th->getMessage()}"); } break; default: