From aa9a82d8ce3b5c2c9509f620069879d0bc7416b3 Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 2 Jul 2025 14:32:16 +0530 Subject: [PATCH 01/12] fix: document attribute type. --- app/controllers/api/migrations.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/migrations.php b/app/controllers/api/migrations.php index 92fca88744..6fae5204b2 100644 --- a/app/controllers/api/migrations.php +++ b/app/controllers/api/migrations.php @@ -410,8 +410,8 @@ App::post('/v1/migrations/csv') 'resources' => $resources, 'resourceId' => $resourceId, 'resourceType' => Resource::TYPE_DATABASE, - 'statusCounters' => [], - 'resourceData' => [], + 'statusCounters' => '{}', + 'resourceData' => '{}', 'errors' => [], 'options' => [ 'path' => $newPath, From eb1d4c68ea5f10b582fb84e7669796cb507c9994 Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 2 Jul 2025 14:54:25 +0530 Subject: [PATCH 02/12] add: logging. --- src/Appwrite/Platform/Workers/Migrations.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index 573772835e..9c5f9b6f79 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -154,6 +154,8 @@ class Migrations extends Action $this->sourceReport = $migrationSource->report(); + Console::log(json_encode(['stage' => 'processSource', 'source' => $source], JSON_PRETTY_PRINT)); + return $migrationSource; } @@ -164,6 +166,8 @@ class Migrations extends Action { $destination = $migration->getAttribute('destination'); + Console::log(json_encode(['stage' => 'processDestination', 'destination' => $destination], JSON_PRETTY_PRINT)); + return match ($destination) { DestinationAppwrite::getName() => new DestinationAppwrite( $this->project->getId(), @@ -214,6 +218,12 @@ class Migrations extends Action ->setPayload($clonedMigrationDocument->getArrayCopy(), ['options', 'credentials']) ->trigger(); + Console::log(json_encode([ + 'stage' => 'updateMigrationDocument', + 'migration' => $migration, + 'clonedMigration' => $clonedMigrationDocument + ], JSON_PRETTY_PRINT)); + return $this->dbForProject->updateDocument('migrations', $migration->getId(), $migration); } @@ -306,6 +316,15 @@ class Migrations extends Action $transfer->run( $migration->getAttribute('resources'), function () use ($migration, $transfer, $projectDocument, $queueForRealtime) { + Console::log(json_encode([ + 'stage' => 'transfer#run', + 'migration' => $migration, + 'details' => [ + 'resourceData' => $transfer->getCache(), + 'statusCounters' => $transfer->getStatusCounters() + ] + ], JSON_PRETTY_PRINT)); + $migration->setAttribute('resourceData', json_encode($transfer->getCache())); $migration->setAttribute('statusCounters', json_encode($transfer->getStatusCounters())); $this->updateMigrationDocument($migration, $projectDocument, $queueForRealtime); From d34635becb6054b804c3e9617c9e30e5460716ce Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 2 Jul 2025 15:13:42 +0530 Subject: [PATCH 03/12] add: logging for errors. --- src/Appwrite/Platform/Workers/Migrations.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index 9c5f9b6f79..3cf43b5c1b 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -332,7 +332,13 @@ class Migrations extends Action $migration->getAttribute('resourceId'), $migration->getAttribute('resourceType') ); + } else { + Console::log(json_encode([ + 'stage' => 'source#errors', + 'errors' => $source->getErrors(), + ], JSON_PRETTY_PRINT)); } + $destination->shutDown(); $source->shutDown(); From 0e50fb7ec5ddc112c40075d69230c79ad7508094 Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 2 Jul 2025 17:04:26 +0530 Subject: [PATCH 04/12] add: migrations lib logging for errors. --- composer.json | 2 +- composer.lock | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index 4c36ab125d..58cc03457b 100644 --- a/composer.json +++ b/composer.json @@ -62,7 +62,7 @@ "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.6.*", "utopia-php/messaging": "0.18.*", - "utopia-php/migration": "0.10.*", + "utopia-php/migration": "logging-dev", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", diff --git a/composer.lock b/composer.lock index 05c8a49512..b78635d9af 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": "55bc52686a08d64930e6af7411ac0654", + "content-hash": "63bb9b3d7f61273cd71bf98e44ecf83c", "packages": [ { "name": "adhocore/jwt", @@ -3993,16 +3993,16 @@ }, { "name": "utopia-php/migration", - "version": "0.10.1", + "version": "dev-logging", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "ea1c585df7ec5f346f061a11581fc9a91679966f" + "reference": "c6eb35992bc09ccb7210a95519bc12f313c05d28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/ea1c585df7ec5f346f061a11581fc9a91679966f", - "reference": "ea1c585df7ec5f346f061a11581fc9a91679966f", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/c6eb35992bc09ccb7210a95519bc12f313c05d28", + "reference": "c6eb35992bc09ccb7210a95519bc12f313c05d28", "shasum": "" }, "require": { @@ -4043,9 +4043,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.10.1" + "source": "https://github.com/utopia-php/migration/tree/logging" }, - "time": "2025-05-26T15:29:19+00:00" + "time": "2025-07-02T11:33:13+00:00" }, { "name": "utopia-php/orchestration", @@ -8236,7 +8236,9 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": { + "utopia-php/migration": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { From fc1a9a4e16dba695a430f989692fdeff34a174f4 Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 2 Jul 2025 19:13:13 +0530 Subject: [PATCH 05/12] fix: path and revert deps. --- app/controllers/api/migrations.php | 2 +- composer.json | 2 +- composer.lock | 70 ++++++++++---------- src/Appwrite/Platform/Workers/Migrations.php | 24 ------- 4 files changed, 36 insertions(+), 62 deletions(-) diff --git a/app/controllers/api/migrations.php b/app/controllers/api/migrations.php index 6fae5204b2..85751811ba 100644 --- a/app/controllers/api/migrations.php +++ b/app/controllers/api/migrations.php @@ -361,7 +361,7 @@ App::post('/v1/migrations/csv') $hasCompression = $compression !== Compression::NONE; $migrationId = ID::unique(); - $newPath = $deviceForImports->getPath('/' . $migrationId . '_' . $fileId . '.csv'); + $newPath = $deviceForImports->getPath($migrationId . '_' . $fileId . '.csv'); if ($hasEncryption || $hasCompression) { $source = $deviceForFiles->read($path); diff --git a/composer.json b/composer.json index 58cc03457b..4c36ab125d 100644 --- a/composer.json +++ b/composer.json @@ -62,7 +62,7 @@ "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.6.*", "utopia-php/messaging": "0.18.*", - "utopia-php/migration": "logging-dev", + "utopia-php/migration": "0.10.*", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", diff --git a/composer.lock b/composer.lock index b78635d9af..b809b01124 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": "63bb9b3d7f61273cd71bf98e44ecf83c", + "content-hash": "55bc52686a08d64930e6af7411ac0654", "packages": [ { "name": "adhocore/jwt", @@ -1878,16 +1878,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.45", + "version": "3.0.46", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "bd81b90d5963c6b9d87de50357585375223f4dd8" + "reference": "56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/bd81b90d5963c6b9d87de50357585375223f4dd8", - "reference": "bd81b90d5963c6b9d87de50357585375223f4dd8", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6", + "reference": "56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6", "shasum": "" }, "require": { @@ -1968,7 +1968,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.45" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.46" }, "funding": [ { @@ -1984,7 +1984,7 @@ "type": "tidelift" } ], - "time": "2025-06-22T22:54:43+00:00" + "time": "2025-06-26T16:29:55+00:00" }, { "name": "psr/container", @@ -2547,16 +2547,16 @@ }, { "name": "symfony/http-client", - "version": "v7.3.0", + "version": "v7.3.1", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "57e4fb86314015a695a750ace358d07a7e37b8a9" + "reference": "4403d87a2c16f33345dca93407a8714ee8c05a64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/57e4fb86314015a695a750ace358d07a7e37b8a9", - "reference": "57e4fb86314015a695a750ace358d07a7e37b8a9", + "url": "https://api.github.com/repos/symfony/http-client/zipball/4403d87a2c16f33345dca93407a8714ee8c05a64", + "reference": "4403d87a2c16f33345dca93407a8714ee8c05a64", "shasum": "" }, "require": { @@ -2568,6 +2568,7 @@ }, "conflict": { "amphp/amp": "<2.5", + "amphp/socket": "<1.1", "php-http/discovery": "<1.15", "symfony/http-foundation": "<6.4" }, @@ -2580,7 +2581,6 @@ "require-dev": { "amphp/http-client": "^4.2.1|^5.0", "amphp/http-tunnel": "^1.0|^2.0", - "amphp/socket": "^1.1", "guzzlehttp/promises": "^1.4|^2.0", "nyholm/psr7": "^1.0", "php-http/httplug": "^1.0|^2.0", @@ -2622,7 +2622,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v7.3.0" + "source": "https://github.com/symfony/http-client/tree/v7.3.1" }, "funding": [ { @@ -2638,7 +2638,7 @@ "type": "tidelift" } ], - "time": "2025-05-02T08:23:16+00:00" + "time": "2025-06-28T07:58:39+00:00" }, { "name": "symfony/http-client-contracts", @@ -2960,16 +2960,16 @@ }, { "name": "tbachert/spi", - "version": "v1.0.3", + "version": "v1.0.5", "source": { "type": "git", "url": "https://github.com/Nevay/spi.git", - "reference": "506a79c98e1a51522e76ee921ccb6c62d52faf3a" + "reference": "e7078767866d0a9e0f91d3f9d42a832df5e39002" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Nevay/spi/zipball/506a79c98e1a51522e76ee921ccb6c62d52faf3a", - "reference": "506a79c98e1a51522e76ee921ccb6c62d52faf3a", + "url": "https://api.github.com/repos/Nevay/spi/zipball/e7078767866d0a9e0f91d3f9d42a832df5e39002", + "reference": "e7078767866d0a9e0f91d3f9d42a832df5e39002", "shasum": "" }, "require": { @@ -2987,7 +2987,7 @@ "extra": { "class": "Nevay\\SPI\\Composer\\Plugin", "branch-alias": { - "dev-main": "0.2.x-dev" + "dev-main": "1.0.x-dev" }, "plugin-optional": true }, @@ -3006,9 +3006,9 @@ ], "support": { "issues": "https://github.com/Nevay/spi/issues", - "source": "https://github.com/Nevay/spi/tree/v1.0.3" + "source": "https://github.com/Nevay/spi/tree/v1.0.5" }, - "time": "2025-04-02T19:38:14+00:00" + "time": "2025-06-29T15:42:06+00:00" }, { "name": "thecodingmachine/safe", @@ -3993,16 +3993,16 @@ }, { "name": "utopia-php/migration", - "version": "dev-logging", + "version": "0.10.1", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "c6eb35992bc09ccb7210a95519bc12f313c05d28" + "reference": "ea1c585df7ec5f346f061a11581fc9a91679966f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/c6eb35992bc09ccb7210a95519bc12f313c05d28", - "reference": "c6eb35992bc09ccb7210a95519bc12f313c05d28", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/ea1c585df7ec5f346f061a11581fc9a91679966f", + "reference": "ea1c585df7ec5f346f061a11581fc9a91679966f", "shasum": "" }, "require": { @@ -4043,9 +4043,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/logging" + "source": "https://github.com/utopia-php/migration/tree/0.10.1" }, - "time": "2025-07-02T11:33:13+00:00" + "time": "2025-05-26T15:29:19+00:00" }, { "name": "utopia-php/orchestration", @@ -7255,16 +7255,16 @@ }, { "name": "symfony/console", - "version": "v7.3.0", + "version": "v7.3.1", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44" + "reference": "9e27aecde8f506ba0fd1d9989620c04a87697101" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/66c1440edf6f339fd82ed6c7caa76cb006211b44", - "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44", + "url": "https://api.github.com/repos/symfony/console/zipball/9e27aecde8f506ba0fd1d9989620c04a87697101", + "reference": "9e27aecde8f506ba0fd1d9989620c04a87697101", "shasum": "" }, "require": { @@ -7329,7 +7329,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.3.0" + "source": "https://github.com/symfony/console/tree/v7.3.1" }, "funding": [ { @@ -7345,7 +7345,7 @@ "type": "tidelift" } ], - "time": "2025-05-24T10:34:04+00:00" + "time": "2025-06-27T19:55:54+00:00" }, { "name": "symfony/filesystem", @@ -8236,9 +8236,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "utopia-php/migration": 20 - }, + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index 3cf43b5c1b..807cf5ec9d 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -154,8 +154,6 @@ class Migrations extends Action $this->sourceReport = $migrationSource->report(); - Console::log(json_encode(['stage' => 'processSource', 'source' => $source], JSON_PRETTY_PRINT)); - return $migrationSource; } @@ -166,8 +164,6 @@ class Migrations extends Action { $destination = $migration->getAttribute('destination'); - Console::log(json_encode(['stage' => 'processDestination', 'destination' => $destination], JSON_PRETTY_PRINT)); - return match ($destination) { DestinationAppwrite::getName() => new DestinationAppwrite( $this->project->getId(), @@ -218,12 +214,6 @@ class Migrations extends Action ->setPayload($clonedMigrationDocument->getArrayCopy(), ['options', 'credentials']) ->trigger(); - Console::log(json_encode([ - 'stage' => 'updateMigrationDocument', - 'migration' => $migration, - 'clonedMigration' => $clonedMigrationDocument - ], JSON_PRETTY_PRINT)); - return $this->dbForProject->updateDocument('migrations', $migration->getId(), $migration); } @@ -316,15 +306,6 @@ class Migrations extends Action $transfer->run( $migration->getAttribute('resources'), function () use ($migration, $transfer, $projectDocument, $queueForRealtime) { - Console::log(json_encode([ - 'stage' => 'transfer#run', - 'migration' => $migration, - 'details' => [ - 'resourceData' => $transfer->getCache(), - 'statusCounters' => $transfer->getStatusCounters() - ] - ], JSON_PRETTY_PRINT)); - $migration->setAttribute('resourceData', json_encode($transfer->getCache())); $migration->setAttribute('statusCounters', json_encode($transfer->getStatusCounters())); $this->updateMigrationDocument($migration, $projectDocument, $queueForRealtime); @@ -332,11 +313,6 @@ class Migrations extends Action $migration->getAttribute('resourceId'), $migration->getAttribute('resourceType') ); - } else { - Console::log(json_encode([ - 'stage' => 'source#errors', - 'errors' => $source->getErrors(), - ], JSON_PRETTY_PRINT)); } $destination->shutDown(); From 6d792fcb6ce28acbd3be2105355272c32e5e087b Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 2 Jul 2025 19:20:30 +0530 Subject: [PATCH 06/12] revert: lock. --- composer.lock | 52 +++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/composer.lock b/composer.lock index b809b01124..05c8a49512 100644 --- a/composer.lock +++ b/composer.lock @@ -1878,16 +1878,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.46", + "version": "3.0.45", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6" + "reference": "bd81b90d5963c6b9d87de50357585375223f4dd8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6", - "reference": "56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/bd81b90d5963c6b9d87de50357585375223f4dd8", + "reference": "bd81b90d5963c6b9d87de50357585375223f4dd8", "shasum": "" }, "require": { @@ -1968,7 +1968,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.46" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.45" }, "funding": [ { @@ -1984,7 +1984,7 @@ "type": "tidelift" } ], - "time": "2025-06-26T16:29:55+00:00" + "time": "2025-06-22T22:54:43+00:00" }, { "name": "psr/container", @@ -2547,16 +2547,16 @@ }, { "name": "symfony/http-client", - "version": "v7.3.1", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "4403d87a2c16f33345dca93407a8714ee8c05a64" + "reference": "57e4fb86314015a695a750ace358d07a7e37b8a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/4403d87a2c16f33345dca93407a8714ee8c05a64", - "reference": "4403d87a2c16f33345dca93407a8714ee8c05a64", + "url": "https://api.github.com/repos/symfony/http-client/zipball/57e4fb86314015a695a750ace358d07a7e37b8a9", + "reference": "57e4fb86314015a695a750ace358d07a7e37b8a9", "shasum": "" }, "require": { @@ -2568,7 +2568,6 @@ }, "conflict": { "amphp/amp": "<2.5", - "amphp/socket": "<1.1", "php-http/discovery": "<1.15", "symfony/http-foundation": "<6.4" }, @@ -2581,6 +2580,7 @@ "require-dev": { "amphp/http-client": "^4.2.1|^5.0", "amphp/http-tunnel": "^1.0|^2.0", + "amphp/socket": "^1.1", "guzzlehttp/promises": "^1.4|^2.0", "nyholm/psr7": "^1.0", "php-http/httplug": "^1.0|^2.0", @@ -2622,7 +2622,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v7.3.1" + "source": "https://github.com/symfony/http-client/tree/v7.3.0" }, "funding": [ { @@ -2638,7 +2638,7 @@ "type": "tidelift" } ], - "time": "2025-06-28T07:58:39+00:00" + "time": "2025-05-02T08:23:16+00:00" }, { "name": "symfony/http-client-contracts", @@ -2960,16 +2960,16 @@ }, { "name": "tbachert/spi", - "version": "v1.0.5", + "version": "v1.0.3", "source": { "type": "git", "url": "https://github.com/Nevay/spi.git", - "reference": "e7078767866d0a9e0f91d3f9d42a832df5e39002" + "reference": "506a79c98e1a51522e76ee921ccb6c62d52faf3a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Nevay/spi/zipball/e7078767866d0a9e0f91d3f9d42a832df5e39002", - "reference": "e7078767866d0a9e0f91d3f9d42a832df5e39002", + "url": "https://api.github.com/repos/Nevay/spi/zipball/506a79c98e1a51522e76ee921ccb6c62d52faf3a", + "reference": "506a79c98e1a51522e76ee921ccb6c62d52faf3a", "shasum": "" }, "require": { @@ -2987,7 +2987,7 @@ "extra": { "class": "Nevay\\SPI\\Composer\\Plugin", "branch-alias": { - "dev-main": "1.0.x-dev" + "dev-main": "0.2.x-dev" }, "plugin-optional": true }, @@ -3006,9 +3006,9 @@ ], "support": { "issues": "https://github.com/Nevay/spi/issues", - "source": "https://github.com/Nevay/spi/tree/v1.0.5" + "source": "https://github.com/Nevay/spi/tree/v1.0.3" }, - "time": "2025-06-29T15:42:06+00:00" + "time": "2025-04-02T19:38:14+00:00" }, { "name": "thecodingmachine/safe", @@ -7255,16 +7255,16 @@ }, { "name": "symfony/console", - "version": "v7.3.1", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "9e27aecde8f506ba0fd1d9989620c04a87697101" + "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/9e27aecde8f506ba0fd1d9989620c04a87697101", - "reference": "9e27aecde8f506ba0fd1d9989620c04a87697101", + "url": "https://api.github.com/repos/symfony/console/zipball/66c1440edf6f339fd82ed6c7caa76cb006211b44", + "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44", "shasum": "" }, "require": { @@ -7329,7 +7329,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.3.1" + "source": "https://github.com/symfony/console/tree/v7.3.0" }, "funding": [ { @@ -7345,7 +7345,7 @@ "type": "tidelift" } ], - "time": "2025-06-27T19:55:54+00:00" + "time": "2025-05-24T10:34:04+00:00" }, { "name": "symfony/filesystem", From 6f5d3d53c081f730fa651fc56b54d1ee37730438 Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 2 Jul 2025 19:51:36 +0530 Subject: [PATCH 07/12] bump: for tests. --- composer.json | 2 +- composer.lock | 70 ++++++++++++++++++++++++++------------------------- 2 files changed, 37 insertions(+), 35 deletions(-) diff --git a/composer.json b/composer.json index 4c36ab125d..9598bc3ebe 100644 --- a/composer.json +++ b/composer.json @@ -62,7 +62,7 @@ "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.6.*", "utopia-php/messaging": "0.18.*", - "utopia-php/migration": "0.10.*", + "utopia-php/migration": "fix-path-dev", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", diff --git a/composer.lock b/composer.lock index 05c8a49512..b5128bff85 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": "55bc52686a08d64930e6af7411ac0654", + "content-hash": "0adf677d7a79dd195419f512265b9905", "packages": [ { "name": "adhocore/jwt", @@ -1878,16 +1878,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.45", + "version": "3.0.46", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "bd81b90d5963c6b9d87de50357585375223f4dd8" + "reference": "56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/bd81b90d5963c6b9d87de50357585375223f4dd8", - "reference": "bd81b90d5963c6b9d87de50357585375223f4dd8", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6", + "reference": "56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6", "shasum": "" }, "require": { @@ -1968,7 +1968,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.45" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.46" }, "funding": [ { @@ -1984,7 +1984,7 @@ "type": "tidelift" } ], - "time": "2025-06-22T22:54:43+00:00" + "time": "2025-06-26T16:29:55+00:00" }, { "name": "psr/container", @@ -2547,16 +2547,16 @@ }, { "name": "symfony/http-client", - "version": "v7.3.0", + "version": "v7.3.1", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "57e4fb86314015a695a750ace358d07a7e37b8a9" + "reference": "4403d87a2c16f33345dca93407a8714ee8c05a64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/57e4fb86314015a695a750ace358d07a7e37b8a9", - "reference": "57e4fb86314015a695a750ace358d07a7e37b8a9", + "url": "https://api.github.com/repos/symfony/http-client/zipball/4403d87a2c16f33345dca93407a8714ee8c05a64", + "reference": "4403d87a2c16f33345dca93407a8714ee8c05a64", "shasum": "" }, "require": { @@ -2568,6 +2568,7 @@ }, "conflict": { "amphp/amp": "<2.5", + "amphp/socket": "<1.1", "php-http/discovery": "<1.15", "symfony/http-foundation": "<6.4" }, @@ -2580,7 +2581,6 @@ "require-dev": { "amphp/http-client": "^4.2.1|^5.0", "amphp/http-tunnel": "^1.0|^2.0", - "amphp/socket": "^1.1", "guzzlehttp/promises": "^1.4|^2.0", "nyholm/psr7": "^1.0", "php-http/httplug": "^1.0|^2.0", @@ -2622,7 +2622,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v7.3.0" + "source": "https://github.com/symfony/http-client/tree/v7.3.1" }, "funding": [ { @@ -2638,7 +2638,7 @@ "type": "tidelift" } ], - "time": "2025-05-02T08:23:16+00:00" + "time": "2025-06-28T07:58:39+00:00" }, { "name": "symfony/http-client-contracts", @@ -2960,16 +2960,16 @@ }, { "name": "tbachert/spi", - "version": "v1.0.3", + "version": "v1.0.5", "source": { "type": "git", "url": "https://github.com/Nevay/spi.git", - "reference": "506a79c98e1a51522e76ee921ccb6c62d52faf3a" + "reference": "e7078767866d0a9e0f91d3f9d42a832df5e39002" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Nevay/spi/zipball/506a79c98e1a51522e76ee921ccb6c62d52faf3a", - "reference": "506a79c98e1a51522e76ee921ccb6c62d52faf3a", + "url": "https://api.github.com/repos/Nevay/spi/zipball/e7078767866d0a9e0f91d3f9d42a832df5e39002", + "reference": "e7078767866d0a9e0f91d3f9d42a832df5e39002", "shasum": "" }, "require": { @@ -2987,7 +2987,7 @@ "extra": { "class": "Nevay\\SPI\\Composer\\Plugin", "branch-alias": { - "dev-main": "0.2.x-dev" + "dev-main": "1.0.x-dev" }, "plugin-optional": true }, @@ -3006,9 +3006,9 @@ ], "support": { "issues": "https://github.com/Nevay/spi/issues", - "source": "https://github.com/Nevay/spi/tree/v1.0.3" + "source": "https://github.com/Nevay/spi/tree/v1.0.5" }, - "time": "2025-04-02T19:38:14+00:00" + "time": "2025-06-29T15:42:06+00:00" }, { "name": "thecodingmachine/safe", @@ -3993,16 +3993,16 @@ }, { "name": "utopia-php/migration", - "version": "0.10.1", + "version": "dev-fix-path", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "ea1c585df7ec5f346f061a11581fc9a91679966f" + "reference": "1f2271ec2be7daba00ce025dbbb25a988caf4796" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/ea1c585df7ec5f346f061a11581fc9a91679966f", - "reference": "ea1c585df7ec5f346f061a11581fc9a91679966f", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/1f2271ec2be7daba00ce025dbbb25a988caf4796", + "reference": "1f2271ec2be7daba00ce025dbbb25a988caf4796", "shasum": "" }, "require": { @@ -4043,9 +4043,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.10.1" + "source": "https://github.com/utopia-php/migration/tree/fix-path" }, - "time": "2025-05-26T15:29:19+00:00" + "time": "2025-07-02T14:18:24+00:00" }, { "name": "utopia-php/orchestration", @@ -7255,16 +7255,16 @@ }, { "name": "symfony/console", - "version": "v7.3.0", + "version": "v7.3.1", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44" + "reference": "9e27aecde8f506ba0fd1d9989620c04a87697101" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/66c1440edf6f339fd82ed6c7caa76cb006211b44", - "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44", + "url": "https://api.github.com/repos/symfony/console/zipball/9e27aecde8f506ba0fd1d9989620c04a87697101", + "reference": "9e27aecde8f506ba0fd1d9989620c04a87697101", "shasum": "" }, "require": { @@ -7329,7 +7329,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.3.0" + "source": "https://github.com/symfony/console/tree/v7.3.1" }, "funding": [ { @@ -7345,7 +7345,7 @@ "type": "tidelift" } ], - "time": "2025-05-24T10:34:04+00:00" + "time": "2025-06-27T19:55:54+00:00" }, { "name": "symfony/filesystem", @@ -8236,7 +8236,9 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": { + "utopia-php/migration": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { From ed2d12f8966309b3dfa29e4a5b7874abcf04dafb Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 2 Jul 2025 19:55:42 +0530 Subject: [PATCH 08/12] update: full path on appwrite. --- app/controllers/api/migrations.php | 7 +++++++ composer.json | 2 +- composer.lock | 18 ++++++++---------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/app/controllers/api/migrations.php b/app/controllers/api/migrations.php index 85751811ba..f292a90a77 100644 --- a/app/controllers/api/migrations.php +++ b/app/controllers/api/migrations.php @@ -401,6 +401,13 @@ App::post('/v1/migrations/csv') $fileSize = $deviceForImports->getFileSize($newPath); $resources = Transfer::extractServices([Transfer::GROUP_DATABASES]); + // full path + $newPath = str_ireplace( + $deviceForImports->getRoot(), + $deviceForImports->getRoot() . DIRECTORY_SEPARATOR, + $newPath + ); + $migration = $dbForProject->createDocument('migrations', new Document([ '$id' => $migrationId, 'status' => 'pending', diff --git a/composer.json b/composer.json index 9598bc3ebe..4c36ab125d 100644 --- a/composer.json +++ b/composer.json @@ -62,7 +62,7 @@ "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.6.*", "utopia-php/messaging": "0.18.*", - "utopia-php/migration": "fix-path-dev", + "utopia-php/migration": "0.10.*", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", diff --git a/composer.lock b/composer.lock index b5128bff85..b809b01124 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": "0adf677d7a79dd195419f512265b9905", + "content-hash": "55bc52686a08d64930e6af7411ac0654", "packages": [ { "name": "adhocore/jwt", @@ -3993,16 +3993,16 @@ }, { "name": "utopia-php/migration", - "version": "dev-fix-path", + "version": "0.10.1", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "1f2271ec2be7daba00ce025dbbb25a988caf4796" + "reference": "ea1c585df7ec5f346f061a11581fc9a91679966f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/1f2271ec2be7daba00ce025dbbb25a988caf4796", - "reference": "1f2271ec2be7daba00ce025dbbb25a988caf4796", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/ea1c585df7ec5f346f061a11581fc9a91679966f", + "reference": "ea1c585df7ec5f346f061a11581fc9a91679966f", "shasum": "" }, "require": { @@ -4043,9 +4043,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/fix-path" + "source": "https://github.com/utopia-php/migration/tree/0.10.1" }, - "time": "2025-07-02T14:18:24+00:00" + "time": "2025-05-26T15:29:19+00:00" }, { "name": "utopia-php/orchestration", @@ -8236,9 +8236,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "utopia-php/migration": 20 - }, + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { From b1724e9c9ddac72c666a548039acc267d0aea164 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 2 Jul 2025 10:40:35 -0400 Subject: [PATCH 09/12] Update lock --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index b809b01124..0e61f2cd4b 100644 --- a/composer.lock +++ b/composer.lock @@ -3993,16 +3993,16 @@ }, { "name": "utopia-php/migration", - "version": "0.10.1", + "version": "0.10.2", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "ea1c585df7ec5f346f061a11581fc9a91679966f" + "reference": "42da0d3f00bb8a3eb480294ca94b5402e6a5a35c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/ea1c585df7ec5f346f061a11581fc9a91679966f", - "reference": "ea1c585df7ec5f346f061a11581fc9a91679966f", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/42da0d3f00bb8a3eb480294ca94b5402e6a5a35c", + "reference": "42da0d3f00bb8a3eb480294ca94b5402e6a5a35c", "shasum": "" }, "require": { @@ -4043,9 +4043,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.10.1" + "source": "https://github.com/utopia-php/migration/tree/0.10.2" }, - "time": "2025-05-26T15:29:19+00:00" + "time": "2025-07-02T14:37:14+00:00" }, { "name": "utopia-php/orchestration", From ce8ae2294a0ef6ccd9a4aea9cdf633b8560094cf Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 2 Jul 2025 12:58:37 -0400 Subject: [PATCH 10/12] Update lock --- composer.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/composer.lock b/composer.lock index 0e61f2cd4b..abea16be08 100644 --- a/composer.lock +++ b/composer.lock @@ -3493,16 +3493,16 @@ }, { "name": "utopia-php/database", - "version": "0.71.8", + "version": "0.71.9", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "7dff6b67a54f1a7f9d3f210db4c6e40d7052b79e" + "reference": "eb2f759020bba617e99dd67973a9bd949b47f54e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/7dff6b67a54f1a7f9d3f210db4c6e40d7052b79e", - "reference": "7dff6b67a54f1a7f9d3f210db4c6e40d7052b79e", + "url": "https://api.github.com/repos/utopia-php/database/zipball/eb2f759020bba617e99dd67973a9bd949b47f54e", + "reference": "eb2f759020bba617e99dd67973a9bd949b47f54e", "shasum": "" }, "require": { @@ -3543,9 +3543,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.71.8" + "source": "https://github.com/utopia-php/database/tree/0.71.9" }, - "time": "2025-06-26T14:48:17+00:00" + "time": "2025-07-02T16:37:41+00:00" }, { "name": "utopia-php/detector", @@ -3993,16 +3993,16 @@ }, { "name": "utopia-php/migration", - "version": "0.10.2", + "version": "0.10.3", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "42da0d3f00bb8a3eb480294ca94b5402e6a5a35c" + "reference": "c8509727d0c5ecef31c1063b5901ed1a7541c71e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/42da0d3f00bb8a3eb480294ca94b5402e6a5a35c", - "reference": "42da0d3f00bb8a3eb480294ca94b5402e6a5a35c", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/c8509727d0c5ecef31c1063b5901ed1a7541c71e", + "reference": "c8509727d0c5ecef31c1063b5901ed1a7541c71e", "shasum": "" }, "require": { @@ -4043,9 +4043,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.10.2" + "source": "https://github.com/utopia-php/migration/tree/0.10.3" }, - "time": "2025-07-02T14:37:14+00:00" + "time": "2025-07-02T16:57:46+00:00" }, { "name": "utopia-php/orchestration", From 2ce3118ba96bd54df4be354f89eadcbb93b5d397 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 2 Jul 2025 13:36:46 -0400 Subject: [PATCH 11/12] Remove path update --- app/controllers/api/migrations.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/app/controllers/api/migrations.php b/app/controllers/api/migrations.php index f292a90a77..85751811ba 100644 --- a/app/controllers/api/migrations.php +++ b/app/controllers/api/migrations.php @@ -401,13 +401,6 @@ App::post('/v1/migrations/csv') $fileSize = $deviceForImports->getFileSize($newPath); $resources = Transfer::extractServices([Transfer::GROUP_DATABASES]); - // full path - $newPath = str_ireplace( - $deviceForImports->getRoot(), - $deviceForImports->getRoot() . DIRECTORY_SEPARATOR, - $newPath - ); - $migration = $dbForProject->createDocument('migrations', new Document([ '$id' => $migrationId, 'status' => 'pending', From 55dc965dd6e1a55e925b4a698fb8fe285805b7b3 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 2 Jul 2025 14:32:05 -0400 Subject: [PATCH 12/12] Update lib --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index abea16be08..01a3ce7401 100644 --- a/composer.lock +++ b/composer.lock @@ -3993,16 +3993,16 @@ }, { "name": "utopia-php/migration", - "version": "0.10.3", + "version": "0.10.4", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "c8509727d0c5ecef31c1063b5901ed1a7541c71e" + "reference": "0c85917482db172b3ccdc0704e42af3c1cc89361" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/c8509727d0c5ecef31c1063b5901ed1a7541c71e", - "reference": "c8509727d0c5ecef31c1063b5901ed1a7541c71e", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/0c85917482db172b3ccdc0704e42af3c1cc89361", + "reference": "0c85917482db172b3ccdc0704e42af3c1cc89361", "shasum": "" }, "require": { @@ -4043,9 +4043,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.10.3" + "source": "https://github.com/utopia-php/migration/tree/0.10.4" }, - "time": "2025-07-02T16:57:46+00:00" + "time": "2025-07-02T18:31:09+00:00" }, { "name": "utopia-php/orchestration",