From 7da9d480d0d464795ed5a5c0d25fa5ce5dd0866a Mon Sep 17 00:00:00 2001 From: fogelito Date: Tue, 6 Jan 2026 10:43:16 +0200 Subject: [PATCH 01/13] cleanUp --- composer.json | 2 +- composer.lock | 91 +++++++++++--------- src/Appwrite/Platform/Workers/Migrations.php | 18 +++- 3 files changed, 67 insertions(+), 44 deletions(-) diff --git a/composer.json b/composer.json index 844a10d7e8..a3db644676 100644 --- a/composer.json +++ b/composer.json @@ -64,7 +64,7 @@ "utopia-php/locale": "0.8.*", "utopia-php/logger": "0.6.*", "utopia-php/messaging": "0.20.*", - "utopia-php/migration": "1.3.*", + "utopia-php/migration": "dev-cleanup-hook as 1.3.9", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", diff --git a/composer.lock b/composer.lock index c678d1c01e..a13e80acda 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b873febd2b03c32ec61a57b690cc44a2", + "content-hash": "8c0e85fcc3d892a54e6d63bac68e2c8d", "packages": [ { "name": "adhocore/jwt", @@ -4515,16 +4515,16 @@ }, { "name": "utopia-php/migration", - "version": "1.3.9", + "version": "dev-cleanup-hook", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "c55ec67c74663190cda10fd79297422147be7e85" + "reference": "3236527485034fd14352597ea5b63a9f1c69e9d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/c55ec67c74663190cda10fd79297422147be7e85", - "reference": "c55ec67c74663190cda10fd79297422147be7e85", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/3236527485034fd14352597ea5b63a9f1c69e9d5", + "reference": "3236527485034fd14352597ea5b63a9f1c69e9d5", "shasum": "" }, "require": { @@ -4564,9 +4564,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/1.3.9" + "source": "https://github.com/utopia-php/migration/tree/cleanup-hook" }, - "time": "2025-12-08T08:45:09+00:00" + "time": "2026-01-06T08:31:17+00:00" }, { "name": "utopia-php/mongo", @@ -5438,16 +5438,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "1.8.6", + "version": "1.8.9", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "b6cc29d3bd247e193f3c06b4168dc69d884645f0" + "reference": "5fc210f7403f9ecfa068cd2a74210ec6e2a3cec1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/b6cc29d3bd247e193f3c06b4168dc69d884645f0", - "reference": "b6cc29d3bd247e193f3c06b4168dc69d884645f0", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/5fc210f7403f9ecfa068cd2a74210ec6e2a3cec1", + "reference": "5fc210f7403f9ecfa068cd2a74210ec6e2a3cec1", "shasum": "" }, "require": { @@ -5483,9 +5483,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/1.8.6" + "source": "https://github.com/appwrite/sdk-generator/tree/1.8.9" }, - "time": "2025-12-31T10:22:17+00:00" + "time": "2026-01-02T12:09:51+00:00" }, { "name": "doctrine/annotations", @@ -5566,30 +5566,29 @@ }, { "name": "doctrine/instantiator", - "version": "2.0.0", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" + "reference": "23da848e1a2308728fe5fdddabf4be17ff9720c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/23da848e1a2308728fe5fdddabf4be17ff9720c7", + "reference": "23da848e1a2308728fe5fdddabf4be17ff9720c7", "shasum": "" }, "require": { - "php": "^8.1" + "php": "^8.4" }, "require-dev": { - "doctrine/coding-standard": "^11", + "doctrine/coding-standard": "^14", "ext-pdo": "*", "ext-phar": "*", "phpbench/phpbench": "^1.2", - "phpstan/phpstan": "^1.9.4", - "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^9.5.27", - "vimeo/psalm": "^5.4" + "phpstan/phpstan": "^2.1", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^10.5.58" }, "type": "library", "autoload": { @@ -5616,7 +5615,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/2.0.0" + "source": "https://github.com/doctrine/instantiator/tree/2.1.0" }, "funding": [ { @@ -5632,7 +5631,7 @@ "type": "tidelift" } ], - "time": "2022-12-30T00:23:10+00:00" + "time": "2026-01-05T06:47:08+00:00" }, { "name": "doctrine/lexer", @@ -5713,16 +5712,16 @@ }, { "name": "laravel/pint", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "69dcca060ecb15e4b564af63d1f642c81a241d6f" + "reference": "c67b4195b75491e4dfc6b00b1c78b68d86f54c90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/69dcca060ecb15e4b564af63d1f642c81a241d6f", - "reference": "69dcca060ecb15e4b564af63d1f642c81a241d6f", + "url": "https://api.github.com/repos/laravel/pint/zipball/c67b4195b75491e4dfc6b00b1c78b68d86f54c90", + "reference": "c67b4195b75491e4dfc6b00b1c78b68d86f54c90", "shasum": "" }, "require": { @@ -5733,9 +5732,9 @@ "php": "^8.2.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.90.0", - "illuminate/view": "^12.40.1", - "larastan/larastan": "^3.8.0", + "friendsofphp/php-cs-fixer": "^3.92.4", + "illuminate/view": "^12.44.0", + "larastan/larastan": "^3.8.1", "laravel-zero/framework": "^12.0.4", "mockery/mockery": "^1.6.12", "nunomaduro/termwind": "^2.3.3", @@ -5776,7 +5775,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2025-11-25T21:15:52+00:00" + "time": "2026-01-05T16:49:17+00:00" }, { "name": "matthiasmullie/minify", @@ -8562,16 +8561,16 @@ }, { "name": "symfony/process", - "version": "v8.0.0", + "version": "v8.0.3", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "a0a750500c4ce900d69ba4e9faf16f82c10ee149" + "reference": "0cbbd88ec836f8757641c651bb995335846abb78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/a0a750500c4ce900d69ba4e9faf16f82c10ee149", - "reference": "a0a750500c4ce900d69ba4e9faf16f82c10ee149", + "url": "https://api.github.com/repos/symfony/process/zipball/0cbbd88ec836f8757641c651bb995335846abb78", + "reference": "0cbbd88ec836f8757641c651bb995335846abb78", "shasum": "" }, "require": { @@ -8603,7 +8602,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v8.0.0" + "source": "https://github.com/symfony/process/tree/v8.0.3" }, "funding": [ { @@ -8623,7 +8622,7 @@ "type": "tidelift" } ], - "time": "2025-10-16T16:25:44+00:00" + "time": "2025-12-19T10:01:18+00:00" }, { "name": "symfony/string", @@ -8943,10 +8942,18 @@ "time": "2024-03-07T20:33:40+00:00" } ], - "aliases": [], + "aliases": [ + { + "package": "utopia-php/migration", + "version": "dev-cleanup-hook", + "alias": "1.3.9", + "alias_normalized": "1.3.9.0" + } + ], "minimum-stability": "stable", "stability-flags": { - "utopia-php/audit": 5 + "utopia-php/audit": 5, + "utopia-php/migration": 20 }, "prefer-stable": false, "prefer-lowest": false, @@ -8971,5 +8978,5 @@ "platform-overrides": { "php": "8.3" }, - "plugin-api-version": "2.9.0" + "plugin-api-version": "2.6.0" } diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index 972757408e..f04617e899 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -110,10 +110,18 @@ class Migrations extends Action $events = $payload['events'] ?? []; $migration = new Document($payload['migration'] ?? []); + if ($migration->isEmpty()) { + throw new \Exception("Migration not found"); + } + if ($project->getId() === 'console') { return; } + if ($project->isEmpty()) { + throw new \Exception("Project not found"); + } + $this->dbForProject = $dbForProject; $this->dbForPlatform = $dbForPlatform; $this->project = $project; @@ -312,7 +320,12 @@ class Migrations extends Action Mail $queueForMails, array $platform, ): void { - $project = $this->dbForPlatform->getDocument('projects', $this->project->getId()); + $project = $this->project; + + if ($project->isEmpty()) { + throw new \Exception("Project not found"); + } + $tempAPIKey = $this->generateAPIKey($project); $transfer = $source = $destination = null; @@ -439,6 +452,9 @@ class Migrations extends Action } } + $source?->cleanUp(); + $destination?->cleanUp(); + $transfer = null; $source = null; $destination = null; From 3a4fb5dd14162b72e9424e4dda42aa815f56b7fc Mon Sep 17 00:00:00 2001 From: fogelito Date: Tue, 6 Jan 2026 10:56:33 +0200 Subject: [PATCH 02/13] throws --- src/Appwrite/Platform/Workers/Migrations.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index f04617e899..c692b26dd8 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -111,7 +111,7 @@ class Migrations extends Action $migration = new Document($payload['migration'] ?? []); if ($migration->isEmpty()) { - throw new \Exception("Migration not found"); + throw new Exception('Missing migration'); } if ($project->getId() === 'console') { @@ -119,7 +119,7 @@ class Migrations extends Action } if ($project->isEmpty()) { - throw new \Exception("Project not found"); + throw new Exception('Missing project'); } $this->dbForProject = $dbForProject; From b6e8b55994287292bf75267ac85b971a67174e6e Mon Sep 17 00:00:00 2001 From: fogelito Date: Tue, 6 Jan 2026 11:01:38 +0200 Subject: [PATCH 03/13] Throw --- src/Appwrite/Platform/Workers/Migrations.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index c692b26dd8..bdbbcda58c 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -111,7 +111,7 @@ class Migrations extends Action $migration = new Document($payload['migration'] ?? []); if ($migration->isEmpty()) { - throw new Exception('Missing migration'); + throw new \Exception('Migration not found'); } if ($project->getId() === 'console') { @@ -119,7 +119,7 @@ class Migrations extends Action } if ($project->isEmpty()) { - throw new Exception('Missing project'); + throw new \Exception('Project not found'); } $this->dbForProject = $dbForProject; @@ -322,10 +322,6 @@ class Migrations extends Action ): void { $project = $this->project; - if ($project->isEmpty()) { - throw new \Exception("Project not found"); - } - $tempAPIKey = $this->generateAPIKey($project); $transfer = $source = $destination = null; From 59b41c4b52db0107438e1407a431e42a0fb61702 Mon Sep 17 00:00:00 2001 From: fogelito Date: Tue, 6 Jan 2026 11:16:34 +0200 Subject: [PATCH 04/13] lock --- composer.json | 2 +- composer.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index a3db644676..04dc96594f 100644 --- a/composer.json +++ b/composer.json @@ -64,7 +64,7 @@ "utopia-php/locale": "0.8.*", "utopia-php/logger": "0.6.*", "utopia-php/messaging": "0.20.*", - "utopia-php/migration": "dev-cleanup-hook as 1.3.9", + "utopia-php/migration": "dev-cleanup-hook as 1.3.999", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", diff --git a/composer.lock b/composer.lock index a13e80acda..4060b5014b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8c0e85fcc3d892a54e6d63bac68e2c8d", + "content-hash": "672dd44ed8a3889612a3dabd35dced5d", "packages": [ { "name": "adhocore/jwt", @@ -8946,8 +8946,8 @@ { "package": "utopia-php/migration", "version": "dev-cleanup-hook", - "alias": "1.3.9", - "alias_normalized": "1.3.9.0" + "alias": "1.3.999", + "alias_normalized": "1.3.999.0" } ], "minimum-stability": "stable", From 14347d86a8aa0fb55517b8b3cf45878df2fbe91e Mon Sep 17 00:00:00 2001 From: fogelito Date: Tue, 6 Jan 2026 14:49:19 +0200 Subject: [PATCH 05/13] try disableValidation --- src/Appwrite/Platform/Workers/Deletes.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Appwrite/Platform/Workers/Deletes.php b/src/Appwrite/Platform/Workers/Deletes.php index dbe1882294..94b6490f8d 100644 --- a/src/Appwrite/Platform/Workers/Deletes.php +++ b/src/Appwrite/Platform/Workers/Deletes.php @@ -516,8 +516,13 @@ class Deletes extends Action $dsn = new DSN('mysql://' . $document->getAttribute('database', 'console')); } + /** + * @var $dbForProject Database + */ $dbForProject = $getProjectDB($document); + $dbForProject->disableValidation(); + $projectCollectionIds = [ ...\array_keys(Config::getParam('collections', [])['projects']), SQL::COLLECTION, From ac9214f3c48d98f4c86756d9c0062d5d5a81f119 Mon Sep 17 00:00:00 2001 From: fogelito Date: Tue, 6 Jan 2026 14:57:54 +0200 Subject: [PATCH 06/13] revert --- src/Appwrite/Platform/Workers/Deletes.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Deletes.php b/src/Appwrite/Platform/Workers/Deletes.php index 94b6490f8d..dbe1882294 100644 --- a/src/Appwrite/Platform/Workers/Deletes.php +++ b/src/Appwrite/Platform/Workers/Deletes.php @@ -516,13 +516,8 @@ class Deletes extends Action $dsn = new DSN('mysql://' . $document->getAttribute('database', 'console')); } - /** - * @var $dbForProject Database - */ $dbForProject = $getProjectDB($document); - $dbForProject->disableValidation(); - $projectCollectionIds = [ ...\array_keys(Config::getParam('collections', [])['projects']), SQL::COLLECTION, From 89c988d73c18b1a00d4425fdcf82347376460a20 Mon Sep 17 00:00:00 2001 From: fogelito Date: Tue, 6 Jan 2026 16:36:34 +0200 Subject: [PATCH 07/13] finally try catch --- src/Appwrite/Platform/Workers/Migrations.php | 68 ++++++++++---------- 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index bdbbcda58c..7e05e40910 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -414,46 +414,48 @@ class Migrations extends Action $migration->setAttribute('errors', $this->sanitizeErrors($sourceErrors, $destinationErrors)); } } finally { - $this->updateMigrationDocument($migration, $project, $queueForRealtime); + try { + $this->updateMigrationDocument($migration, $project, $queueForRealtime); - if ($migration->getAttribute('status', '') === 'failed') { - Console::error('Migration('.$migration->getSequence().':'.$migration->getId().') failed, Project('.$this->project->getSequence().':'.$this->project->getId().')'); + if ($migration->getAttribute('status', '') === 'failed') { + Console::error('Migration('.$migration->getSequence().':'.$migration->getId().') failed, Project('.$this->project->getSequence().':'.$this->project->getId().')'); - $sourceErrors = $source?->getErrors() ?? []; - $destinationErrors = $destination?->getErrors() ?? []; + $sourceErrors = $source?->getErrors() ?? []; + $destinationErrors = $destination?->getErrors() ?? []; - foreach ([...$sourceErrors, ...$destinationErrors] as $error) { - /** @var MigrationException $error */ - if ($error->getCode() === 0 || $error->getCode() >= 500) { - ($this->logError)($error, 'appwrite-worker', 'appwrite-queue-' . self::getName(), [ - 'migrationId' => $migration->getId(), - 'source' => $migration->getAttribute('source') ?? '', - 'destination' => $migration->getAttribute('destination') ?? '', - 'resourceName' => $error->getResourceName(), - 'resourceGroup' => $error->getResourceGroup(), - ]); + foreach ([...$sourceErrors, ...$destinationErrors] as $error) { + /** @var MigrationException $error */ + if ($error->getCode() === 0 || $error->getCode() >= 500) { + ($this->logError)($error, 'appwrite-worker', 'appwrite-queue-' . self::getName(), [ + 'migrationId' => $migration->getId(), + 'source' => $migration->getAttribute('source') ?? '', + 'destination' => $migration->getAttribute('destination') ?? '', + 'resourceName' => $error->getResourceName(), + 'resourceGroup' => $error->getResourceGroup(), + ]); + } + } + + $source?->error(); + $destination?->error(); + } + + if ($migration->getAttribute('status', '') === 'completed') { + $destination?->success(); + $source?->success(); + + if ($migration->getAttribute('destination') === DestinationCSV::getName()) { + $this->handleCSVExportComplete($project, $migration, $queueForMails, $queueForRealtime, $platform); } } + } finally { + $source?->cleanUp(); + $destination?->cleanUp(); - $source?->error(); - $destination?->error(); + $transfer = null; + $source = null; + $destination = null; } - - if ($migration->getAttribute('status', '') === 'completed') { - $destination?->success(); - $source?->success(); - - if ($migration->getAttribute('destination') === DestinationCSV::getName()) { - $this->handleCSVExportComplete($project, $migration, $queueForMails, $queueForRealtime, $platform); - } - } - - $source?->cleanUp(); - $destination?->cleanUp(); - - $transfer = null; - $source = null; - $destination = null; } } From 6756ee31b6b775b4dc8ee4f815b26cf250b89ece Mon Sep 17 00:00:00 2001 From: fogelito Date: Tue, 6 Jan 2026 16:55:36 +0200 Subject: [PATCH 08/13] migration can not be empty --- src/Appwrite/Platform/Workers/Migrations.php | 23 ++++++-------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index 7e05e40910..363167ce8b 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -395,24 +395,15 @@ class Migrations extends Action Console::error('Line: ' . $th->getLine()); Console::error($th->getTraceAsString()); - if (! $migration->isEmpty()) { - $migration->setAttribute('status', 'failed'); - $migration->setAttribute('stage', 'finished'); + $migration->setAttribute('status', 'failed'); + $migration->setAttribute('stage', 'finished'); - call_user_func($this->logError, $th, 'appwrite-worker', 'appwrite-queue-'.self::getName(), [ - 'migrationId' => $migration->getId(), - 'source' => $migration->getAttribute('source') ?? '', - 'destination' => $migration->getAttribute('destination') ?? '', - ]); + call_user_func($this->logError, $th, 'appwrite-worker', 'appwrite-queue-'.self::getName(), [ + 'migrationId' => $migration->getId(), + 'source' => $migration->getAttribute('source') ?? '', + 'destination' => $migration->getAttribute('destination') ?? '', + ]); - return; - } - - if ($transfer) { - $sourceErrors = $source->getErrors(); - $destinationErrors = $destination->getErrors(); - $migration->setAttribute('errors', $this->sanitizeErrors($sourceErrors, $destinationErrors)); - } } finally { try { $this->updateMigrationDocument($migration, $project, $queueForRealtime); From 5642983f9193feea035bf38b038af77015b822b3 Mon Sep 17 00:00:00 2001 From: fogelito Date: Tue, 6 Jan 2026 17:26:30 +0200 Subject: [PATCH 09/13] Pull main --- composer.lock | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/composer.lock b/composer.lock index 9149c1d79a..c25218568b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "078c447eafec076507b5bc8b8c0198e7", + "content-hash": "ed8ed7aad5a4e5a4dc6bffd5b83d47c8", "packages": [ { "name": "adhocore/jwt", @@ -4516,16 +4516,16 @@ }, { "name": "utopia-php/migration", - "version": "1.3.10", + "version": "dev-cleanup-hook", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "cb357c42a5a5614605b546effbea1204ed64c6b0" + "reference": "88feeef1f9459a8fba6f0b978d4ddf27acabe167" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/cb357c42a5a5614605b546effbea1204ed64c6b0", - "reference": "cb357c42a5a5614605b546effbea1204ed64c6b0", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/88feeef1f9459a8fba6f0b978d4ddf27acabe167", + "reference": "88feeef1f9459a8fba6f0b978d4ddf27acabe167", "shasum": "" }, "require": { @@ -4565,9 +4565,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/1.3.10" + "source": "https://github.com/utopia-php/migration/tree/cleanup-hook" }, - "time": "2026-01-06T10:47:11+00:00" + "time": "2026-01-06T11:45:42+00:00" }, { "name": "utopia-php/mongo", @@ -8943,10 +8943,18 @@ "time": "2024-03-07T20:33:40+00:00" } ], - "aliases": [], + "aliases": [ + { + "package": "utopia-php/migration", + "version": "dev-cleanup-hook", + "alias": "1.3.999", + "alias_normalized": "1.3.999.0" + } + ], "minimum-stability": "stable", "stability-flags": { - "utopia-php/audit": 5 + "utopia-php/audit": 5, + "utopia-php/migration": 20 }, "prefer-stable": false, "prefer-lowest": false, @@ -8971,5 +8979,5 @@ "platform-overrides": { "php": "8.3" }, - "plugin-api-version": "2.9.0" + "plugin-api-version": "2.6.0" } From a6eb479c931737b4ebab33e697d1a3c6a29a1885 Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 7 Jan 2026 09:38:58 +0200 Subject: [PATCH 10/13] composer migration --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 78708339d3..7d08c2bf32 100644 --- a/composer.json +++ b/composer.json @@ -64,7 +64,7 @@ "utopia-php/locale": "0.8.*", "utopia-php/logger": "0.6.*", "utopia-php/messaging": "0.20.*", - "utopia-php/migration": "dev-cleanup-hook as 1.3.999", + "utopia-php/migration": "1.*.*", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", From 502012ddf79c53a2bdac3ebda6e1ff0b851423e0 Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 7 Jan 2026 09:42:21 +0200 Subject: [PATCH 11/13] composer migration 1.3.* --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 7d08c2bf32..d45d723430 100644 --- a/composer.json +++ b/composer.json @@ -64,7 +64,7 @@ "utopia-php/locale": "0.8.*", "utopia-php/logger": "0.6.*", "utopia-php/messaging": "0.20.*", - "utopia-php/migration": "1.*.*", + "utopia-php/migration": "1.3.*", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", From 61e98a501a7d6c682d118e2c8bf65d9d558062e5 Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 7 Jan 2026 09:43:13 +0200 Subject: [PATCH 12/13] composer migration 1.3.* --- composer.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/composer.lock b/composer.lock index 996844994c..73abeb57f0 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f63c88303152af32cae4c800b8642540", + "content-hash": "375a062e8675e7e6938c1d8cc7b61ecf", "packages": [ { "name": "adhocore/jwt", @@ -4516,16 +4516,16 @@ }, { "name": "utopia-php/migration", - "version": "1.3.11", + "version": "1.3.12", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "798f0976a1c14234c4b283b858b08c9afbcc1662" + "reference": "1b8d5519c50630e4c0b6a79be615b70d5f23d2e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/798f0976a1c14234c4b283b858b08c9afbcc1662", - "reference": "798f0976a1c14234c4b283b858b08c9afbcc1662", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/1b8d5519c50630e4c0b6a79be615b70d5f23d2e4", + "reference": "1b8d5519c50630e4c0b6a79be615b70d5f23d2e4", "shasum": "" }, "require": { @@ -4582,10 +4582,10 @@ "utopia" ], "support": { - "source": "https://github.com/utopia-php/migration/tree/1.3.11", + "source": "https://github.com/utopia-php/migration/tree/1.3.12", "issues": "https://github.com/utopia-php/migration/issues" }, - "time": "2026-01-06T12:07:07+00:00" + "time": "2026-01-07T06:07:33+00:00" }, { "name": "utopia-php/mongo", From 0d3bcc9b3ae5bfbe3f5d31484535b67a1466ee19 Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 7 Jan 2026 09:52:23 +0200 Subject: [PATCH 13/13] message todo --- src/Appwrite/Platform/Workers/Migrations.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index 363167ce8b..e1039510f4 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -435,6 +435,7 @@ class Migrations extends Action $destination?->success(); $source?->success(); + // todo: Move to CSV hook if ($migration->getAttribute('destination') === DestinationCSV::getName()) { $this->handleCSVExportComplete($project, $migration, $queueForMails, $queueForRealtime, $platform); }