diff --git a/composer.json b/composer.json index ce55926d23..0c8fc869be 100644 --- a/composer.json +++ b/composer.json @@ -66,7 +66,7 @@ "utopia-php/locale": "0.8.*", "utopia-php/logger": "0.6.*", "utopia-php/messaging": "0.20.*", - "utopia-php/migration": "1.6.*", + "utopia-php/migration": "1.6.x-dev", "utopia-php/platform": "0.7.*", "utopia-php/pools": "1.*", "utopia-php/span": "1.1.*", @@ -109,5 +109,18 @@ "php-http/discovery": true, "tbachert/spi": true } - } + }, + "repositories": [ + { + "type": "path", + "url": "../utopia-migration", + "options": { + "versions": { + "utopia-php/migration": "1.6.x-dev" + } + } + } + ], + "minimum-stability": "dev", + "prefer-stable": true } diff --git a/composer.lock b/composer.lock index f17670f7b1..031bf10a1b 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": "dd9887a50fb434887461a99413007573", + "content-hash": "9e05c1a1869d52d4e7679f99fb04b51b", "packages": [ { "name": "adhocore/jwt", @@ -4464,17 +4464,11 @@ }, { "name": "utopia-php/migration", - "version": "1.6.1", - "source": { - "type": "git", - "url": "https://github.com/utopia-php/migration.git", - "reference": "c5c7544d02d2418536d41050794050132f247d62" - }, + "version": "1.6.x-dev", "dist": { - "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/c5c7544d02d2418536d41050794050132f247d62", - "reference": "c5c7544d02d2418536d41050794050132f247d62", - "shasum": "" + "type": "path", + "url": "../utopia-migration", + "reference": "0152f6ddf33c1c9e359c32f8021691c4e7c124b5" }, "require": { "appwrite/appwrite": "19.*", @@ -4499,7 +4493,25 @@ "Utopia\\Migration\\": "src/Migration" } }, - "notification-url": "https://packagist.org/downloads/", + "autoload-dev": { + "psr-4": { + "Utopia\\Tests\\": "tests/Migration" + } + }, + "scripts": { + "test": [ + "./vendor/bin/phpunit" + ], + "lint": [ + "./vendor/bin/pint --test" + ], + "format": [ + "./vendor/bin/pint" + ], + "check": [ + "./vendor/bin/phpstan analyse --level 3 src tests --memory-limit 2G" + ] + }, "license": [ "MIT" ], @@ -4511,11 +4523,9 @@ "upf", "utopia" ], - "support": { - "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/1.6.1" - }, - "time": "2026-02-17T05:49:48+00:00" + "transport-options": { + "relative": true + } }, { "name": "utopia-php/mongo", @@ -8884,9 +8894,11 @@ } ], "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, + "minimum-stability": "dev", + "stability-flags": { + "utopia-php/migration": 20 + }, + "prefer-stable": true, "prefer-lowest": false, "platform": { "php": ">=8.3.0", diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index 5e729af98f..7bc6fe8d32 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -313,6 +313,8 @@ class Migrations extends Action 'files.write', 'functions.read', 'functions.write', + 'sites.read', + 'sites.write', 'tokens.read', 'tokens.write', ] diff --git a/src/Appwrite/Utopia/Response/Model/MigrationReport.php b/src/Appwrite/Utopia/Response/Model/MigrationReport.php index 56d17d3f7f..d20c1035ea 100644 --- a/src/Appwrite/Utopia/Response/Model/MigrationReport.php +++ b/src/Appwrite/Utopia/Response/Model/MigrationReport.php @@ -53,6 +53,24 @@ class MigrationReport extends Model 'default' => 0, 'example' => 20, ]) + ->addRule(Resource::TYPE_SITE, [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Number of sites to be migrated.', + 'default' => 0, + 'example' => 5, + ]) + ->addRule(Resource::TYPE_SITE_DEPLOYMENT, [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Number of site deployments to be migrated.', + 'default' => 0, + 'example' => 5, + ]) + ->addRule(Resource::TYPE_SITE_VARIABLE, [ + 'type' => self::TYPE_INTEGER, + 'description' => 'Number of site variables to be migrated.', + 'default' => 0, + 'example' => 10, + ]) ->addRule('size', [ 'type' => self::TYPE_INTEGER, 'description' => 'Size of files to be migrated in mb.',