From 45f1ed706b58a93174e6a287f4f0f4dd23996c91 Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Thu, 28 May 2026 08:46:28 +0100 Subject: [PATCH 1/6] Move webhook into integrations group --- src/Migration/Destinations/Appwrite.php | 10 ++--- src/Migration/Sources/Appwrite.php | 56 ++++++++++++------------- src/Migration/Transfer.php | 4 +- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/Migration/Destinations/Appwrite.php b/src/Migration/Destinations/Appwrite.php index 90f596eed8..c8330e520e 100644 --- a/src/Migration/Destinations/Appwrite.php +++ b/src/Migration/Destinations/Appwrite.php @@ -279,10 +279,10 @@ class Appwrite extends Destination // Integrations Resource::TYPE_PLATFORM, Resource::TYPE_API_KEY, + Resource::TYPE_WEBHOOK, // Settings Resource::TYPE_PROJECT_VARIABLE, - Resource::TYPE_WEBHOOK, // Backups Resource::TYPE_BACKUP_POLICY, @@ -3087,6 +3087,10 @@ class Appwrite extends Destination /** @var ApiKey $resource */ $this->createApiKey($resource); break; + case Resource::TYPE_WEBHOOK: + /** @var Webhook $resource */ + $this->createWebhook($resource); + break; } if ($resource->getStatus() !== Resource::STATUS_SKIPPED) { @@ -3103,10 +3107,6 @@ class Appwrite extends Destination /** @var ProjectVariable $resource */ $this->createProjectVariable($resource); break; - case Resource::TYPE_WEBHOOK: - /** @var Webhook $resource */ - $this->createWebhook($resource); - break; } if ($resource->getStatus() !== Resource::STATUS_SKIPPED) { diff --git a/src/Migration/Sources/Appwrite.php b/src/Migration/Sources/Appwrite.php index fd03b7d044..4114bb2e1c 100644 --- a/src/Migration/Sources/Appwrite.php +++ b/src/Migration/Sources/Appwrite.php @@ -215,13 +215,13 @@ class Appwrite extends Source // Integrations Resource::TYPE_PLATFORM, Resource::TYPE_API_KEY, + Resource::TYPE_WEBHOOK, // Backups Resource::TYPE_BACKUP_POLICY, // Settings Resource::TYPE_PROJECT_VARIABLE, - Resource::TYPE_WEBHOOK, ]; } @@ -1472,19 +1472,6 @@ class Appwrite extends Source $report[Resource::TYPE_PROJECT_VARIABLE] = 0; } } - - if (\in_array(Resource::TYPE_WEBHOOK, $resources)) { - $webhookQueries = $this->buildQueries( - resourceType: Resource::TYPE_WEBHOOK, - resourceIds: $resourceIds, - limit: 1 - ); - try { - $report[Resource::TYPE_WEBHOOK] = $this->webhooks->list($webhookQueries)->total; - } catch (\Throwable) { - $report[Resource::TYPE_WEBHOOK] = 0; - } - } } /** @@ -1506,20 +1493,6 @@ class Appwrite extends Source )); } } - - if (\in_array(Resource::TYPE_WEBHOOK, $resources)) { - try { - $this->exportWebhooks($batchSize); - } catch (\Throwable $e) { - $this->addError(new Exception( - Resource::TYPE_WEBHOOK, - Transfer::GROUP_SETTINGS, - message: $e->getMessage(), - code: $e->getCode(), - previous: $e - )); - } - } } /** @@ -2425,6 +2398,19 @@ class Appwrite extends Source $report[Resource::TYPE_API_KEY] = 0; } } + + if (\in_array(Resource::TYPE_WEBHOOK, $resources)) { + $webhookQueries = $this->buildQueries( + resourceType: Resource::TYPE_WEBHOOK, + resourceIds: $resourceIds, + limit: 1 + ); + try { + $report[Resource::TYPE_WEBHOOK] = $this->webhooks->list($webhookQueries)->total; + } catch (\Throwable) { + $report[Resource::TYPE_WEBHOOK] = 0; + } + } } /** @@ -2484,6 +2470,20 @@ class Appwrite extends Source )); } } + + if (\in_array(Resource::TYPE_WEBHOOK, $resources)) { + try { + $this->exportWebhooks($batchSize); + } catch (\Throwable $e) { + $this->addError(new Exception( + Resource::TYPE_WEBHOOK, + Transfer::GROUP_INTEGRATIONS, + message: $e->getMessage(), + code: $e->getCode(), + previous: $e + )); + } + } } /** diff --git a/src/Migration/Transfer.php b/src/Migration/Transfer.php index 319e57febd..f7a4a1b25f 100644 --- a/src/Migration/Transfer.php +++ b/src/Migration/Transfer.php @@ -65,6 +65,7 @@ class Transfer public const GROUP_INTEGRATIONS_RESOURCES = [ Resource::TYPE_PLATFORM, Resource::TYPE_API_KEY, + Resource::TYPE_WEBHOOK, ]; public const GROUP_DOCUMENTSDB_RESOURCES = [ Resource::TYPE_DATABASE_DOCUMENTSDB, @@ -96,7 +97,6 @@ class Transfer public const GROUP_SETTINGS_RESOURCES = [ Resource::TYPE_PROJECT_VARIABLE, - Resource::TYPE_WEBHOOK, ]; public const GROUP_BACKUPS_RESOURCES = [ @@ -136,10 +136,10 @@ class Transfer // Integrations Resource::TYPE_PLATFORM, Resource::TYPE_API_KEY, + Resource::TYPE_WEBHOOK, // Settings Resource::TYPE_PROJECT_VARIABLE, - Resource::TYPE_WEBHOOK, // legacy Resource::TYPE_DOCUMENT, From e1e80b749b15622b93788959b2a1da0a5c9ec765 Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Thu, 28 May 2026 11:37:47 +0100 Subject: [PATCH 2/6] Introduce GROUP_PROJECTS, rename TYPE_PROTOCOLS/LABELS/SERVICES with TYPE_PROJECT_* prefix --- src/Migration/Destinations/Appwrite.php | 18 ++++---- src/Migration/Resource.php | 20 ++++---- src/Migration/Resources/Settings/Labels.php | 4 +- .../Resources/Settings/ProjectVariable.php | 2 +- .../Resources/Settings/Protocols.php | 4 +- src/Migration/Resources/Settings/Services.php | 4 +- src/Migration/Resources/Settings/Webhook.php | 2 +- src/Migration/Source.php | 12 ++--- src/Migration/Sources/Appwrite.php | 46 +++++++++---------- src/Migration/Sources/CSV.php | 2 +- src/Migration/Sources/Firebase.php | 2 +- src/Migration/Sources/JSON.php | 2 +- src/Migration/Sources/NHost.php | 2 +- src/Migration/Transfer.php | 20 ++++---- 14 files changed, 70 insertions(+), 70 deletions(-) diff --git a/src/Migration/Destinations/Appwrite.php b/src/Migration/Destinations/Appwrite.php index ee263d105b..cf5a63da39 100644 --- a/src/Migration/Destinations/Appwrite.php +++ b/src/Migration/Destinations/Appwrite.php @@ -293,11 +293,11 @@ class Appwrite extends Destination Resource::TYPE_API_KEY, Resource::TYPE_WEBHOOK, - // Settings + // Project Resource::TYPE_PROJECT_VARIABLE, - Resource::TYPE_PROTOCOLS, - Resource::TYPE_LABELS, - Resource::TYPE_SERVICES, + Resource::TYPE_PROJECT_PROTOCOLS, + Resource::TYPE_PROJECT_LABELS, + Resource::TYPE_PROJECT_SERVICES, // Backups Resource::TYPE_BACKUP_POLICY, @@ -459,7 +459,7 @@ class Appwrite extends Destination Transfer::GROUP_SITES => $this->importSiteResource($resource), Transfer::GROUP_INTEGRATIONS => $this->importIntegrationsResource($resource), Transfer::GROUP_BACKUPS => $this->importBackupResource($resource), - Transfer::GROUP_SETTINGS => $this->importSettingsResource($resource), + Transfer::GROUP_PROJECTS => $this->importProjectsResource($resource), default => throw new \Exception('Invalid resource group', Exception::CODE_VALIDATION), }; } catch (\Throwable $e) { @@ -3123,22 +3123,22 @@ class Appwrite extends Destination return $resource; } - public function importSettingsResource(Resource $resource): Resource + public function importProjectsResource(Resource $resource): Resource { switch ($resource->getName()) { case Resource::TYPE_PROJECT_VARIABLE: /** @var ProjectVariable $resource */ $this->createProjectVariable($resource); break; - case Resource::TYPE_PROTOCOLS: + case Resource::TYPE_PROJECT_PROTOCOLS: /** @var Protocols $resource */ $this->createProtocols($resource); break; - case Resource::TYPE_LABELS: + case Resource::TYPE_PROJECT_LABELS: /** @var Labels $resource */ $this->createLabels($resource); break; - case Resource::TYPE_SERVICES: + case Resource::TYPE_PROJECT_SERVICES: /** @var ServicesResource $resource */ $this->createServices($resource); break; diff --git a/src/Migration/Resource.php b/src/Migration/Resource.php index f77b3d8d60..0edb63bdea 100644 --- a/src/Migration/Resource.php +++ b/src/Migration/Resource.php @@ -78,13 +78,13 @@ abstract class Resource implements \JsonSerializable // Integrations public const TYPE_PLATFORM = 'platform'; public const TYPE_API_KEY = 'api-key'; - - // Settings - public const TYPE_PROJECT_VARIABLE = 'project-variable'; public const TYPE_WEBHOOK = 'webhook'; - public const TYPE_PROTOCOLS = 'protocols'; - public const TYPE_LABELS = 'labels'; - public const TYPE_SERVICES = 'services'; + + // Project (per-project singleton/settings resources) + public const TYPE_PROJECT_VARIABLE = 'project-variable'; + public const TYPE_PROJECT_PROTOCOLS = 'project-protocols'; + public const TYPE_PROJECT_LABELS = 'project-labels'; + public const TYPE_PROJECT_SERVICES = 'project-services'; // Messaging public const TYPE_SUBSCRIBER = 'subscriber'; @@ -128,11 +128,11 @@ abstract class Resource implements \JsonSerializable self::TYPE_POLICIES, self::TYPE_PLATFORM, self::TYPE_API_KEY, - self::TYPE_PROJECT_VARIABLE, self::TYPE_WEBHOOK, - self::TYPE_PROTOCOLS, - self::TYPE_LABELS, - self::TYPE_SERVICES, + self::TYPE_PROJECT_VARIABLE, + self::TYPE_PROJECT_PROTOCOLS, + self::TYPE_PROJECT_LABELS, + self::TYPE_PROJECT_SERVICES, self::TYPE_PROVIDER, self::TYPE_TOPIC, self::TYPE_SUBSCRIBER, diff --git a/src/Migration/Resources/Settings/Labels.php b/src/Migration/Resources/Settings/Labels.php index a2da658dd1..cc8c075a11 100644 --- a/src/Migration/Resources/Settings/Labels.php +++ b/src/Migration/Resources/Settings/Labels.php @@ -54,12 +54,12 @@ class Labels extends Resource public static function getName(): string { - return Resource::TYPE_LABELS; + return Resource::TYPE_PROJECT_LABELS; } public function getGroup(): string { - return Transfer::GROUP_SETTINGS; + return Transfer::GROUP_PROJECTS; } /** diff --git a/src/Migration/Resources/Settings/ProjectVariable.php b/src/Migration/Resources/Settings/ProjectVariable.php index 1585695dfb..58146cf09e 100644 --- a/src/Migration/Resources/Settings/ProjectVariable.php +++ b/src/Migration/Resources/Settings/ProjectVariable.php @@ -58,7 +58,7 @@ class ProjectVariable extends Resource public function getGroup(): string { - return Transfer::GROUP_SETTINGS; + return Transfer::GROUP_PROJECTS; } public function getKey(): string diff --git a/src/Migration/Resources/Settings/Protocols.php b/src/Migration/Resources/Settings/Protocols.php index de0609a4f4..1d65251684 100644 --- a/src/Migration/Resources/Settings/Protocols.php +++ b/src/Migration/Resources/Settings/Protocols.php @@ -57,12 +57,12 @@ class Protocols extends Resource public static function getName(): string { - return Resource::TYPE_PROTOCOLS; + return Resource::TYPE_PROJECT_PROTOCOLS; } public function getGroup(): string { - return Transfer::GROUP_SETTINGS; + return Transfer::GROUP_PROJECTS; } public function getRest(): bool diff --git a/src/Migration/Resources/Settings/Services.php b/src/Migration/Resources/Settings/Services.php index 3b7474c468..a7176ad854 100644 --- a/src/Migration/Resources/Settings/Services.php +++ b/src/Migration/Resources/Settings/Services.php @@ -99,12 +99,12 @@ class Services extends Resource public static function getName(): string { - return Resource::TYPE_SERVICES; + return Resource::TYPE_PROJECT_SERVICES; } public function getGroup(): string { - return Transfer::GROUP_SETTINGS; + return Transfer::GROUP_PROJECTS; } public function getAccount(): bool diff --git a/src/Migration/Resources/Settings/Webhook.php b/src/Migration/Resources/Settings/Webhook.php index 20ba47f624..184d2482cf 100644 --- a/src/Migration/Resources/Settings/Webhook.php +++ b/src/Migration/Resources/Settings/Webhook.php @@ -73,7 +73,7 @@ class Webhook extends Resource public function getGroup(): string { - return Transfer::GROUP_SETTINGS; + return Transfer::GROUP_INTEGRATIONS; } public function getWebhookName(): string diff --git a/src/Migration/Source.php b/src/Migration/Source.php index fe53f2cd13..9cf1d080fc 100644 --- a/src/Migration/Source.php +++ b/src/Migration/Source.php @@ -56,7 +56,7 @@ abstract class Source extends Target return static::$defaultBatchSize; } - public function getSettingsBatchSize(): int + public function getProjectsBatchSize(): int { return static::$defaultBatchSize; } @@ -126,7 +126,7 @@ abstract class Source extends Target Transfer::GROUP_SITES => Transfer::GROUP_SITES_RESOURCES, Transfer::GROUP_INTEGRATIONS => Transfer::GROUP_INTEGRATIONS_RESOURCES, Transfer::GROUP_BACKUPS => Transfer::GROUP_BACKUPS_RESOURCES, - Transfer::GROUP_SETTINGS => Transfer::GROUP_SETTINGS_RESOURCES, + Transfer::GROUP_PROJECTS => Transfer::GROUP_PROJECTS_RESOURCES, ]; foreach ($mapping as $group => $resources) { @@ -167,8 +167,8 @@ abstract class Source extends Target case Transfer::GROUP_BACKUPS: $this->exportGroupBackups($this->getBackupsBatchSize(), $resources); break; - case Transfer::GROUP_SETTINGS: - $this->exportGroupSettings($this->getSettingsBatchSize(), $resources); + case Transfer::GROUP_PROJECTS: + $this->exportGroupProjects($this->getProjectsBatchSize(), $resources); break; } } @@ -239,10 +239,10 @@ abstract class Source extends Target abstract protected function exportGroupBackups(int $batchSize, array $resources): void; /** - * Export Settings Group + * Export Projects Group * * @param int $batchSize * @param array $resources Resources to export */ - abstract protected function exportGroupSettings(int $batchSize, array $resources): void; + abstract protected function exportGroupProjects(int $batchSize, array $resources): void; } diff --git a/src/Migration/Sources/Appwrite.php b/src/Migration/Sources/Appwrite.php index d796a9fa74..ecee90c891 100644 --- a/src/Migration/Sources/Appwrite.php +++ b/src/Migration/Sources/Appwrite.php @@ -231,11 +231,11 @@ class Appwrite extends Source // Backups Resource::TYPE_BACKUP_POLICY, - // Settings + // Project Resource::TYPE_PROJECT_VARIABLE, - Resource::TYPE_PROTOCOLS, - Resource::TYPE_LABELS, - Resource::TYPE_SERVICES, + Resource::TYPE_PROJECT_PROTOCOLS, + Resource::TYPE_PROJECT_LABELS, + Resource::TYPE_PROJECT_SERVICES, ]; } @@ -276,7 +276,7 @@ class Appwrite extends Source $this->reportSites($resources, $report, $resourceIds); $this->reportIntegrations($resources, $report, $resourceIds); $this->reportBackups($resources, $report, $resourceIds); - $this->reportSettings($resources, $report, $resourceIds); + $this->reportProjects($resources, $report, $resourceIds); $report['version'] = $this->call( 'GET', @@ -1567,7 +1567,7 @@ class Appwrite extends Source } } - private function reportSettings(array $resources, array &$report, array $resourceIds = []): void + private function reportProjects(array $resources, array &$report, array $resourceIds = []): void { if (\in_array(Resource::TYPE_PROJECT_VARIABLE, $resources)) { $variableQueries = $this->buildQueries( @@ -1582,19 +1582,19 @@ class Appwrite extends Source } } - if (\in_array(Resource::TYPE_PROTOCOLS, $resources)) { + if (\in_array(Resource::TYPE_PROJECT_PROTOCOLS, $resources)) { // Singleton — there is exactly one protocols config per project. - $report[Resource::TYPE_PROTOCOLS] = 1; + $report[Resource::TYPE_PROJECT_PROTOCOLS] = 1; } - if (\in_array(Resource::TYPE_LABELS, $resources)) { + if (\in_array(Resource::TYPE_PROJECT_LABELS, $resources)) { // Singleton — one labels array per project. - $report[Resource::TYPE_LABELS] = 1; + $report[Resource::TYPE_PROJECT_LABELS] = 1; } - if (\in_array(Resource::TYPE_SERVICES, $resources)) { + if (\in_array(Resource::TYPE_PROJECT_SERVICES, $resources)) { // Singleton — one services config per project. - $report[Resource::TYPE_SERVICES] = 1; + $report[Resource::TYPE_PROJECT_SERVICES] = 1; } } @@ -1602,7 +1602,7 @@ class Appwrite extends Source * @param int $batchSize * @param array $resources */ - protected function exportGroupSettings(int $batchSize, array $resources): void + protected function exportGroupProjects(int $batchSize, array $resources): void { if (\in_array(Resource::TYPE_PROJECT_VARIABLE, $resources)) { try { @@ -1610,7 +1610,7 @@ class Appwrite extends Source } catch (\Throwable $e) { $this->addError(new Exception( Resource::TYPE_PROJECT_VARIABLE, - Transfer::GROUP_SETTINGS, + Transfer::GROUP_PROJECTS, message: $e->getMessage(), code: (int) $e->getCode() ?: Exception::CODE_INTERNAL, previous: $e @@ -1619,13 +1619,13 @@ class Appwrite extends Source } try { - if (\in_array(Resource::TYPE_PROTOCOLS, $resources)) { + if (\in_array(Resource::TYPE_PROJECT_PROTOCOLS, $resources)) { $this->exportProtocols(); } } catch (\Throwable $e) { $this->addError(new Exception( - Resource::TYPE_PROTOCOLS, - Transfer::GROUP_SETTINGS, + Resource::TYPE_PROJECT_PROTOCOLS, + Transfer::GROUP_PROJECTS, message: $e->getMessage(), code: (int) $e->getCode() ?: Exception::CODE_INTERNAL, previous: $e @@ -1633,13 +1633,13 @@ class Appwrite extends Source } try { - if (\in_array(Resource::TYPE_LABELS, $resources)) { + if (\in_array(Resource::TYPE_PROJECT_LABELS, $resources)) { $this->exportLabels(); } } catch (\Throwable $e) { $this->addError(new Exception( - Resource::TYPE_LABELS, - Transfer::GROUP_SETTINGS, + Resource::TYPE_PROJECT_LABELS, + Transfer::GROUP_PROJECTS, message: $e->getMessage(), code: (int) $e->getCode() ?: Exception::CODE_INTERNAL, previous: $e @@ -1647,13 +1647,13 @@ class Appwrite extends Source } try { - if (\in_array(Resource::TYPE_SERVICES, $resources)) { + if (\in_array(Resource::TYPE_PROJECT_SERVICES, $resources)) { $this->exportServices(); } } catch (\Throwable $e) { $this->addError(new Exception( - Resource::TYPE_SERVICES, - Transfer::GROUP_SETTINGS, + Resource::TYPE_PROJECT_SERVICES, + Transfer::GROUP_PROJECTS, message: $e->getMessage(), code: (int) $e->getCode() ?: Exception::CODE_INTERNAL, previous: $e diff --git a/src/Migration/Sources/CSV.php b/src/Migration/Sources/CSV.php index 22c9399b86..2ddd31dbc8 100644 --- a/src/Migration/Sources/CSV.php +++ b/src/Migration/Sources/CSV.php @@ -440,7 +440,7 @@ class CSV extends Source throw new \Exception('Not Implemented'); } - protected function exportGroupSettings(int $batchSize, array $resources): void + protected function exportGroupProjects(int $batchSize, array $resources): void { throw new \Exception('Not Implemented'); } diff --git a/src/Migration/Sources/Firebase.php b/src/Migration/Sources/Firebase.php index 2bea50de0d..510b86d06b 100644 --- a/src/Migration/Sources/Firebase.php +++ b/src/Migration/Sources/Firebase.php @@ -828,7 +828,7 @@ class Firebase extends Source throw new \Exception('Not implemented'); } - protected function exportGroupSettings(int $batchSize, array $resources): void + protected function exportGroupProjects(int $batchSize, array $resources): void { throw new \Exception('Not implemented'); } diff --git a/src/Migration/Sources/JSON.php b/src/Migration/Sources/JSON.php index 149ad66f97..d1d8ccbc19 100644 --- a/src/Migration/Sources/JSON.php +++ b/src/Migration/Sources/JSON.php @@ -214,7 +214,7 @@ class JSON extends Source throw new \Exception('Not Implemented'); } - protected function exportGroupSettings(int $batchSize, array $resources): void + protected function exportGroupProjects(int $batchSize, array $resources): void { throw new \Exception('Not Implemented'); } diff --git a/src/Migration/Sources/NHost.php b/src/Migration/Sources/NHost.php index 6c8fe0ac88..6fd011e988 100644 --- a/src/Migration/Sources/NHost.php +++ b/src/Migration/Sources/NHost.php @@ -963,7 +963,7 @@ class NHost extends Source throw new \Exception('Not Implemented'); } - protected function exportGroupSettings(int $batchSize, array $resources): void + protected function exportGroupProjects(int $batchSize, array $resources): void { throw new \Exception('Not Implemented'); } diff --git a/src/Migration/Transfer.php b/src/Migration/Transfer.php index 2856c86dc3..f139196f92 100644 --- a/src/Migration/Transfer.php +++ b/src/Migration/Transfer.php @@ -28,7 +28,7 @@ class Transfer public const GROUP_BACKUPS = 'backups'; - public const GROUP_SETTINGS = 'settings'; + public const GROUP_PROJECTS = 'projects'; public const GROUP_AUTH_RESOURCES = [ Resource::TYPE_USER, @@ -97,11 +97,11 @@ class Transfer Resource::TYPE_ATTRIBUTE ]; - public const GROUP_SETTINGS_RESOURCES = [ + public const GROUP_PROJECTS_RESOURCES = [ Resource::TYPE_PROJECT_VARIABLE, - Resource::TYPE_PROTOCOLS, - Resource::TYPE_LABELS, - Resource::TYPE_SERVICES, + Resource::TYPE_PROJECT_PROTOCOLS, + Resource::TYPE_PROJECT_LABELS, + Resource::TYPE_PROJECT_SERVICES, ]; public const GROUP_BACKUPS_RESOURCES = [ @@ -145,11 +145,11 @@ class Transfer Resource::TYPE_API_KEY, Resource::TYPE_WEBHOOK, - // Settings + // Project Resource::TYPE_PROJECT_VARIABLE, - Resource::TYPE_PROTOCOLS, - Resource::TYPE_LABELS, - Resource::TYPE_SERVICES, + Resource::TYPE_PROJECT_PROTOCOLS, + Resource::TYPE_PROJECT_LABELS, + Resource::TYPE_PROJECT_SERVICES, // legacy Resource::TYPE_DOCUMENT, @@ -436,7 +436,7 @@ class Transfer self::GROUP_DATABASES_VECTOR_DB => array_merge($resources, self::GROUP_VECTORSDB_RESOURCES), self::GROUP_MESSAGING => array_merge($resources, self::GROUP_MESSAGING_RESOURCES), self::GROUP_BACKUPS => array_merge($resources, self::GROUP_BACKUPS_RESOURCES), - self::GROUP_SETTINGS => array_merge($resources, self::GROUP_SETTINGS_RESOURCES), + self::GROUP_PROJECTS => array_merge($resources, self::GROUP_PROJECTS_RESOURCES), default => throw new \Exception('No service group found'), }; } From f1c5d449802f52ea85d61b70cc1f7f331a9ffc9e Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Thu, 28 May 2026 11:55:42 +0100 Subject: [PATCH 3/6] Drive services and protocols import/export with map iteration --- src/Migration/Destinations/Appwrite.php | 28 +--- .../Resources/Settings/Protocols.php | 36 ++--- src/Migration/Resources/Settings/Services.php | 150 ++---------------- src/Migration/Sources/Appwrite.php | 28 +--- 4 files changed, 37 insertions(+), 205 deletions(-) diff --git a/src/Migration/Destinations/Appwrite.php b/src/Migration/Destinations/Appwrite.php index cf5a63da39..46c60e0133 100644 --- a/src/Migration/Destinations/Appwrite.php +++ b/src/Migration/Destinations/Appwrite.php @@ -9,8 +9,6 @@ use Appwrite\Enums\BuildRuntime; use Appwrite\Enums\Compression; use Appwrite\Enums\Framework; use Appwrite\Enums\PasswordHash; -use Appwrite\Enums\ProjectProtocolId; -use Appwrite\Enums\ProjectServiceId; use Appwrite\Enums\Runtime; use Appwrite\Enums\SmtpEncryption; use Appwrite\InputFile; @@ -3195,9 +3193,9 @@ class Appwrite extends Destination $project = $this->dbForPlatform->getDocument('projects', $this->projectId); $apis = $project->getAttribute('apis', []); - $apis[(string) ProjectProtocolId::REST()] = $resource->getRest(); - $apis[(string) ProjectProtocolId::GRAPHQL()] = $resource->getGraphql(); - $apis[(string) ProjectProtocolId::WEBSOCKET()] = $resource->getWebsocket(); + foreach ($resource->getProtocols() as $protocolId => $enabled) { + $apis[$protocolId] = (bool) $enabled; + } $this->dbForPlatform->getAuthorization()->skip(fn () => $this->dbForPlatform->updateDocument( 'projects', @@ -3230,23 +3228,9 @@ class Appwrite extends Destination $project = $this->dbForPlatform->getDocument('projects', $this->projectId); $services = $project->getAttribute('services', []); - $services[(string) ProjectServiceId::ACCOUNT()] = $resource->getAccount(); - $services[(string) ProjectServiceId::AVATARS()] = $resource->getAvatars(); - $services[(string) ProjectServiceId::DATABASES()] = $resource->getDatabases(); - $services[(string) ProjectServiceId::TABLESDB()] = $resource->getTablesdb(); - $services[(string) ProjectServiceId::LOCALE()] = $resource->getLocale(); - $services[(string) ProjectServiceId::HEALTH()] = $resource->getHealth(); - $services[(string) ProjectServiceId::PROJECT()] = $resource->getProject(); - $services[(string) ProjectServiceId::STORAGE()] = $resource->getStorage(); - $services[(string) ProjectServiceId::TEAMS()] = $resource->getTeams(); - $services[(string) ProjectServiceId::USERS()] = $resource->getUsers(); - $services[(string) ProjectServiceId::VCS()] = $resource->getVcs(); - $services[(string) ProjectServiceId::SITES()] = $resource->getSites(); - $services[(string) ProjectServiceId::FUNCTIONS()] = $resource->getFunctions(); - $services[(string) ProjectServiceId::PROXY()] = $resource->getProxy(); - $services[(string) ProjectServiceId::GRAPHQL()] = $resource->getGraphql(); - $services[(string) ProjectServiceId::MIGRATIONS()] = $resource->getMigrations(); - $services[(string) ProjectServiceId::MESSAGING()] = $resource->getMessaging(); + foreach ($resource->getServices() as $serviceId => $enabled) { + $services[$serviceId] = (bool) $enabled; + } $this->dbForPlatform->getAuthorization()->skip(fn () => $this->dbForPlatform->updateDocument( 'projects', diff --git a/src/Migration/Resources/Settings/Protocols.php b/src/Migration/Resources/Settings/Protocols.php index 1d65251684..c609ef093f 100644 --- a/src/Migration/Resources/Settings/Protocols.php +++ b/src/Migration/Resources/Settings/Protocols.php @@ -7,16 +7,17 @@ use Utopia\Migration\Transfer; /** * Singleton resource representing the project's exposed API protocols - * (REST, GraphQL, WebSocket). One per project; destination flips each - * via Project::updateProtocol(). + * (REST, GraphQL, WebSocket), keyed by ProtocolId value. One per project; + * destination merges each entry into the project's protocols map. */ class Protocols extends Resource { + /** + * @param array $protocols Map of ProtocolId string → enabled flag. + */ public function __construct( string $id, - private readonly bool $rest = true, - private readonly bool $graphql = true, - private readonly bool $websocket = true, + private readonly array $protocols = [], string $createdAt = '', string $updatedAt = '', ) { @@ -32,9 +33,7 @@ class Protocols extends Resource { return new self( $array['id'], - (bool) ($array['rest'] ?? true), - (bool) ($array['graphql'] ?? true), - (bool) ($array['websocket'] ?? true), + (array) ($array['protocols'] ?? []), createdAt: $array['createdAt'] ?? '', updatedAt: $array['updatedAt'] ?? '', ); @@ -47,9 +46,7 @@ class Protocols extends Resource { return [ 'id' => $this->id, - 'rest' => $this->rest, - 'graphql' => $this->graphql, - 'websocket' => $this->websocket, + 'protocols' => $this->protocols, 'createdAt' => $this->createdAt, 'updatedAt' => $this->updatedAt, ]; @@ -65,18 +62,11 @@ class Protocols extends Resource return Transfer::GROUP_PROJECTS; } - public function getRest(): bool + /** + * @return array + */ + public function getProtocols(): array { - return $this->rest; - } - - public function getGraphql(): bool - { - return $this->graphql; - } - - public function getWebsocket(): bool - { - return $this->websocket; + return $this->protocols; } } diff --git a/src/Migration/Resources/Settings/Services.php b/src/Migration/Resources/Settings/Services.php index a7176ad854..b4a17fa651 100644 --- a/src/Migration/Resources/Settings/Services.php +++ b/src/Migration/Resources/Settings/Services.php @@ -6,31 +6,18 @@ use Utopia\Migration\Resource; use Utopia\Migration\Transfer; /** - * Singleton settings resource carrying the project's 17 per-service - * enable/disable flags. One per project; destination flips each via - * Project::updateService(). + * Singleton settings resource carrying the project's per-service enable/disable + * flags, keyed by ServiceId value. One per project; destination merges each + * entry into the project's services map. */ class Services extends Resource { + /** + * @param array $services Map of ServiceId string → enabled flag. + */ public function __construct( string $id, - private readonly bool $account = true, - private readonly bool $avatars = true, - private readonly bool $databases = true, - private readonly bool $tablesdb = true, - private readonly bool $locale = true, - private readonly bool $health = true, - private readonly bool $project = true, - private readonly bool $storage = true, - private readonly bool $teams = true, - private readonly bool $users = true, - private readonly bool $vcs = true, - private readonly bool $sites = true, - private readonly bool $functions = true, - private readonly bool $proxy = true, - private readonly bool $graphql = true, - private readonly bool $migrations = true, - private readonly bool $messaging = true, + private readonly array $services = [], string $createdAt = '', string $updatedAt = '', ) { @@ -46,23 +33,7 @@ class Services extends Resource { return new self( $array['id'], - (bool) ($array['account'] ?? true), - (bool) ($array['avatars'] ?? true), - (bool) ($array['databases'] ?? true), - (bool) ($array['tablesdb'] ?? true), - (bool) ($array['locale'] ?? true), - (bool) ($array['health'] ?? true), - (bool) ($array['project'] ?? true), - (bool) ($array['storage'] ?? true), - (bool) ($array['teams'] ?? true), - (bool) ($array['users'] ?? true), - (bool) ($array['vcs'] ?? true), - (bool) ($array['sites'] ?? true), - (bool) ($array['functions'] ?? true), - (bool) ($array['proxy'] ?? true), - (bool) ($array['graphql'] ?? true), - (bool) ($array['migrations'] ?? true), - (bool) ($array['messaging'] ?? true), + (array) ($array['services'] ?? []), createdAt: $array['createdAt'] ?? '', updatedAt: $array['updatedAt'] ?? '', ); @@ -75,23 +46,7 @@ class Services extends Resource { return [ 'id' => $this->id, - 'account' => $this->account, - 'avatars' => $this->avatars, - 'databases' => $this->databases, - 'tablesdb' => $this->tablesdb, - 'locale' => $this->locale, - 'health' => $this->health, - 'project' => $this->project, - 'storage' => $this->storage, - 'teams' => $this->teams, - 'users' => $this->users, - 'vcs' => $this->vcs, - 'sites' => $this->sites, - 'functions' => $this->functions, - 'proxy' => $this->proxy, - 'graphql' => $this->graphql, - 'migrations' => $this->migrations, - 'messaging' => $this->messaging, + 'services' => $this->services, 'createdAt' => $this->createdAt, 'updatedAt' => $this->updatedAt, ]; @@ -107,88 +62,11 @@ class Services extends Resource return Transfer::GROUP_PROJECTS; } - public function getAccount(): bool + /** + * @return array + */ + public function getServices(): array { - return $this->account; - } - - public function getAvatars(): bool - { - return $this->avatars; - } - - public function getDatabases(): bool - { - return $this->databases; - } - - public function getTablesdb(): bool - { - return $this->tablesdb; - } - - public function getLocale(): bool - { - return $this->locale; - } - - public function getHealth(): bool - { - return $this->health; - } - - public function getProject(): bool - { - return $this->project; - } - - public function getStorage(): bool - { - return $this->storage; - } - - public function getTeams(): bool - { - return $this->teams; - } - - public function getUsers(): bool - { - return $this->users; - } - - public function getVcs(): bool - { - return $this->vcs; - } - - public function getSites(): bool - { - return $this->sites; - } - - public function getFunctions(): bool - { - return $this->functions; - } - - public function getProxy(): bool - { - return $this->proxy; - } - - public function getGraphql(): bool - { - return $this->graphql; - } - - public function getMigrations(): bool - { - return $this->migrations; - } - - public function getMessaging(): bool - { - return $this->messaging; + return $this->services; } } diff --git a/src/Migration/Sources/Appwrite.php b/src/Migration/Sources/Appwrite.php index ecee90c891..9ee09a6118 100644 --- a/src/Migration/Sources/Appwrite.php +++ b/src/Migration/Sources/Appwrite.php @@ -6,8 +6,6 @@ use Appwrite\AppwriteException; use Appwrite\Client; use Appwrite\Enums\ProjectAuthMethodId; use Appwrite\Enums\ProjectPolicyId; -use Appwrite\Enums\ProjectProtocolId; -use Appwrite\Enums\ProjectServiceId; use Appwrite\Query; use Appwrite\Services\Functions; use Appwrite\Services\Messaging; @@ -1667,28 +1665,12 @@ class Appwrite extends Source $byId = []; foreach ($project->services as $service) { - $byId[(string) $service->id] = $service->enabled; + $byId[(string) $service->id] = (bool) $service->enabled; } $services = new ServicesResource( $this->projectId, - $byId[(string) ProjectServiceId::ACCOUNT()] ?? true, - $byId[(string) ProjectServiceId::AVATARS()] ?? true, - $byId[(string) ProjectServiceId::DATABASES()] ?? true, - $byId[(string) ProjectServiceId::TABLESDB()] ?? true, - $byId[(string) ProjectServiceId::LOCALE()] ?? true, - $byId[(string) ProjectServiceId::HEALTH()] ?? true, - $byId[(string) ProjectServiceId::PROJECT()] ?? true, - $byId[(string) ProjectServiceId::STORAGE()] ?? true, - $byId[(string) ProjectServiceId::TEAMS()] ?? true, - $byId[(string) ProjectServiceId::USERS()] ?? true, - $byId[(string) ProjectServiceId::VCS()] ?? true, - $byId[(string) ProjectServiceId::SITES()] ?? true, - $byId[(string) ProjectServiceId::FUNCTIONS()] ?? true, - $byId[(string) ProjectServiceId::PROXY()] ?? true, - $byId[(string) ProjectServiceId::GRAPHQL()] ?? true, - $byId[(string) ProjectServiceId::MIGRATIONS()] ?? true, - $byId[(string) ProjectServiceId::MESSAGING()] ?? true, + $byId, createdAt: $project->createdAt, updatedAt: $project->updatedAt, ); @@ -1716,14 +1698,12 @@ class Appwrite extends Source $byId = []; foreach ($project->protocols as $protocol) { - $byId[(string) $protocol->id] = $protocol->enabled; + $byId[(string) $protocol->id] = (bool) $protocol->enabled; } $protocols = new Protocols( $this->projectId, - $byId[(string) ProjectProtocolId::REST()] ?? true, - $byId[(string) ProjectProtocolId::GRAPHQL()] ?? true, - $byId[(string) ProjectProtocolId::WEBSOCKET()] ?? true, + $byId, createdAt: $project->createdAt, updatedAt: $project->updatedAt, ); From 12eee286a6ac1870765112f7e3d6613352337369 Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Thu, 28 May 2026 12:46:47 +0100 Subject: [PATCH 4/6] Update MockSource to implement renamed exportGroupProjects --- tests/Migration/Unit/Adapters/MockSource.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Migration/Unit/Adapters/MockSource.php b/tests/Migration/Unit/Adapters/MockSource.php index 28002376fd..529be5ffe2 100644 --- a/tests/Migration/Unit/Adapters/MockSource.php +++ b/tests/Migration/Unit/Adapters/MockSource.php @@ -230,14 +230,14 @@ class MockSource extends Source } } - protected function exportGroupSettings(int $batchSize, array $resources): void + protected function exportGroupProjects(int $batchSize, array $resources): void { - foreach (Transfer::GROUP_SETTINGS_RESOURCES as $resource) { + foreach (Transfer::GROUP_PROJECTS_RESOURCES as $resource) { if (!\in_array($resource, $resources)) { continue; } - $this->handleResourceTransfer(Transfer::GROUP_SETTINGS, $resource); + $this->handleResourceTransfer(Transfer::GROUP_PROJECTS, $resource); } } } From 7c55885aaa04c53b57110180a303a7689480d4cf Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Thu, 28 May 2026 14:32:51 +0100 Subject: [PATCH 5/6] Revert Protocols loop refactor (review feedback: only Services was flagged) --- src/Migration/Destinations/Appwrite.php | 7 ++-- .../Resources/Settings/Protocols.php | 36 ++++++++++++------- src/Migration/Sources/Appwrite.php | 7 ++-- 3 files changed, 32 insertions(+), 18 deletions(-) diff --git a/src/Migration/Destinations/Appwrite.php b/src/Migration/Destinations/Appwrite.php index 46c60e0133..2b89e1be0f 100644 --- a/src/Migration/Destinations/Appwrite.php +++ b/src/Migration/Destinations/Appwrite.php @@ -9,6 +9,7 @@ use Appwrite\Enums\BuildRuntime; use Appwrite\Enums\Compression; use Appwrite\Enums\Framework; use Appwrite\Enums\PasswordHash; +use Appwrite\Enums\ProjectProtocolId; use Appwrite\Enums\Runtime; use Appwrite\Enums\SmtpEncryption; use Appwrite\InputFile; @@ -3193,9 +3194,9 @@ class Appwrite extends Destination $project = $this->dbForPlatform->getDocument('projects', $this->projectId); $apis = $project->getAttribute('apis', []); - foreach ($resource->getProtocols() as $protocolId => $enabled) { - $apis[$protocolId] = (bool) $enabled; - } + $apis[(string) ProjectProtocolId::REST()] = $resource->getRest(); + $apis[(string) ProjectProtocolId::GRAPHQL()] = $resource->getGraphql(); + $apis[(string) ProjectProtocolId::WEBSOCKET()] = $resource->getWebsocket(); $this->dbForPlatform->getAuthorization()->skip(fn () => $this->dbForPlatform->updateDocument( 'projects', diff --git a/src/Migration/Resources/Settings/Protocols.php b/src/Migration/Resources/Settings/Protocols.php index c609ef093f..1d65251684 100644 --- a/src/Migration/Resources/Settings/Protocols.php +++ b/src/Migration/Resources/Settings/Protocols.php @@ -7,17 +7,16 @@ use Utopia\Migration\Transfer; /** * Singleton resource representing the project's exposed API protocols - * (REST, GraphQL, WebSocket), keyed by ProtocolId value. One per project; - * destination merges each entry into the project's protocols map. + * (REST, GraphQL, WebSocket). One per project; destination flips each + * via Project::updateProtocol(). */ class Protocols extends Resource { - /** - * @param array $protocols Map of ProtocolId string → enabled flag. - */ public function __construct( string $id, - private readonly array $protocols = [], + private readonly bool $rest = true, + private readonly bool $graphql = true, + private readonly bool $websocket = true, string $createdAt = '', string $updatedAt = '', ) { @@ -33,7 +32,9 @@ class Protocols extends Resource { return new self( $array['id'], - (array) ($array['protocols'] ?? []), + (bool) ($array['rest'] ?? true), + (bool) ($array['graphql'] ?? true), + (bool) ($array['websocket'] ?? true), createdAt: $array['createdAt'] ?? '', updatedAt: $array['updatedAt'] ?? '', ); @@ -46,7 +47,9 @@ class Protocols extends Resource { return [ 'id' => $this->id, - 'protocols' => $this->protocols, + 'rest' => $this->rest, + 'graphql' => $this->graphql, + 'websocket' => $this->websocket, 'createdAt' => $this->createdAt, 'updatedAt' => $this->updatedAt, ]; @@ -62,11 +65,18 @@ class Protocols extends Resource return Transfer::GROUP_PROJECTS; } - /** - * @return array - */ - public function getProtocols(): array + public function getRest(): bool { - return $this->protocols; + return $this->rest; + } + + public function getGraphql(): bool + { + return $this->graphql; + } + + public function getWebsocket(): bool + { + return $this->websocket; } } diff --git a/src/Migration/Sources/Appwrite.php b/src/Migration/Sources/Appwrite.php index 9ee09a6118..c3397ac822 100644 --- a/src/Migration/Sources/Appwrite.php +++ b/src/Migration/Sources/Appwrite.php @@ -6,6 +6,7 @@ use Appwrite\AppwriteException; use Appwrite\Client; use Appwrite\Enums\ProjectAuthMethodId; use Appwrite\Enums\ProjectPolicyId; +use Appwrite\Enums\ProjectProtocolId; use Appwrite\Query; use Appwrite\Services\Functions; use Appwrite\Services\Messaging; @@ -1698,12 +1699,14 @@ class Appwrite extends Source $byId = []; foreach ($project->protocols as $protocol) { - $byId[(string) $protocol->id] = (bool) $protocol->enabled; + $byId[(string) $protocol->id] = $protocol->enabled; } $protocols = new Protocols( $this->projectId, - $byId, + $byId[(string) ProjectProtocolId::REST()] ?? true, + $byId[(string) ProjectProtocolId::GRAPHQL()] ?? true, + $byId[(string) ProjectProtocolId::WEBSOCKET()] ?? true, createdAt: $project->createdAt, updatedAt: $project->updatedAt, ); From efa66d5fb75e03099c89a4e30cfa0c478ec6e5d0 Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Thu, 28 May 2026 15:16:50 +0100 Subject: [PATCH 6/6] Move SMTP into integrations group (external mail relay; same shape as webhook) --- src/Migration/Destinations/Appwrite.php | 10 +++--- src/Migration/Resources/Settings/SMTP.php | 2 +- src/Migration/Sources/Appwrite.php | 39 ++++++++++++----------- src/Migration/Transfer.php | 4 +-- 4 files changed, 28 insertions(+), 27 deletions(-) diff --git a/src/Migration/Destinations/Appwrite.php b/src/Migration/Destinations/Appwrite.php index 403ea1d2b3..944172540b 100644 --- a/src/Migration/Destinations/Appwrite.php +++ b/src/Migration/Destinations/Appwrite.php @@ -292,13 +292,13 @@ class Appwrite extends Destination Resource::TYPE_PLATFORM, Resource::TYPE_API_KEY, Resource::TYPE_WEBHOOK, + Resource::TYPE_SMTP, // Project Resource::TYPE_PROJECT_VARIABLE, Resource::TYPE_PROJECT_PROTOCOLS, Resource::TYPE_PROJECT_LABELS, Resource::TYPE_PROJECT_SERVICES, - Resource::TYPE_SMTP, // Backups Resource::TYPE_BACKUP_POLICY, @@ -3115,6 +3115,10 @@ class Appwrite extends Destination /** @var Webhook $resource */ $this->createWebhook($resource); break; + case Resource::TYPE_SMTP: + /** @var SMTP $resource */ + $this->createSMTP($resource); + break; } if ($resource->getStatus() !== Resource::STATUS_SKIPPED) { @@ -3143,10 +3147,6 @@ class Appwrite extends Destination /** @var ServicesResource $resource */ $this->createServices($resource); break; - case Resource::TYPE_SMTP: - /** @var SMTP $resource */ - $this->createSMTP($resource); - break; } if ($resource->getStatus() !== Resource::STATUS_SKIPPED) { diff --git a/src/Migration/Resources/Settings/SMTP.php b/src/Migration/Resources/Settings/SMTP.php index 57c695ef1d..ea14895c7a 100644 --- a/src/Migration/Resources/Settings/SMTP.php +++ b/src/Migration/Resources/Settings/SMTP.php @@ -79,7 +79,7 @@ class SMTP extends Resource public function getGroup(): string { - return Transfer::GROUP_PROJECTS; + return Transfer::GROUP_INTEGRATIONS; } public function getEnabled(): bool diff --git a/src/Migration/Sources/Appwrite.php b/src/Migration/Sources/Appwrite.php index b0beaeca19..7265895162 100644 --- a/src/Migration/Sources/Appwrite.php +++ b/src/Migration/Sources/Appwrite.php @@ -227,6 +227,7 @@ class Appwrite extends Source Resource::TYPE_PLATFORM, Resource::TYPE_API_KEY, Resource::TYPE_WEBHOOK, + Resource::TYPE_SMTP, // Backups Resource::TYPE_BACKUP_POLICY, @@ -236,7 +237,6 @@ class Appwrite extends Source Resource::TYPE_PROJECT_PROTOCOLS, Resource::TYPE_PROJECT_LABELS, Resource::TYPE_PROJECT_SERVICES, - Resource::TYPE_SMTP, ]; } @@ -1597,11 +1597,6 @@ class Appwrite extends Source // Singleton — one services config per project. $report[Resource::TYPE_PROJECT_SERVICES] = 1; } - - if (\in_array(Resource::TYPE_SMTP, $resources)) { - // Singleton — one SMTP config per project. - $report[Resource::TYPE_SMTP] = 1; - } } /** @@ -1666,19 +1661,6 @@ class Appwrite extends Source )); } - try { - if (\in_array(Resource::TYPE_SMTP, $resources)) { - $this->exportSMTP(); - } - } catch (\Throwable $e) { - $this->addError(new Exception( - Resource::TYPE_SMTP, - Transfer::GROUP_PROJECTS, - message: $e->getMessage(), - code: (int) $e->getCode() ?: Exception::CODE_INTERNAL, - previous: $e - )); - } } private function exportServices(): void @@ -2673,6 +2655,11 @@ class Appwrite extends Source $report[Resource::TYPE_WEBHOOK] = 0; } } + + if (\in_array(Resource::TYPE_SMTP, $resources)) { + // Singleton — one SMTP config per project. + $report[Resource::TYPE_SMTP] = 1; + } } /** @@ -2746,6 +2733,20 @@ class Appwrite extends Source )); } } + + try { + if (\in_array(Resource::TYPE_SMTP, $resources)) { + $this->exportSMTP(); + } + } catch (\Throwable $e) { + $this->addError(new Exception( + Resource::TYPE_SMTP, + Transfer::GROUP_INTEGRATIONS, + message: $e->getMessage(), + code: (int) $e->getCode() ?: Exception::CODE_INTERNAL, + previous: $e + )); + } } /** diff --git a/src/Migration/Transfer.php b/src/Migration/Transfer.php index ff1acff18d..b446446bc5 100644 --- a/src/Migration/Transfer.php +++ b/src/Migration/Transfer.php @@ -68,6 +68,7 @@ class Transfer Resource::TYPE_PLATFORM, Resource::TYPE_API_KEY, Resource::TYPE_WEBHOOK, + Resource::TYPE_SMTP, ]; public const GROUP_DOCUMENTSDB_RESOURCES = [ Resource::TYPE_DATABASE_DOCUMENTSDB, @@ -102,7 +103,6 @@ class Transfer Resource::TYPE_PROJECT_PROTOCOLS, Resource::TYPE_PROJECT_LABELS, Resource::TYPE_PROJECT_SERVICES, - Resource::TYPE_SMTP, ]; public const GROUP_BACKUPS_RESOURCES = [ @@ -145,13 +145,13 @@ class Transfer Resource::TYPE_PLATFORM, Resource::TYPE_API_KEY, Resource::TYPE_WEBHOOK, + Resource::TYPE_SMTP, // Project Resource::TYPE_PROJECT_VARIABLE, Resource::TYPE_PROJECT_PROTOCOLS, Resource::TYPE_PROJECT_LABELS, Resource::TYPE_PROJECT_SERVICES, - Resource::TYPE_SMTP, // legacy Resource::TYPE_DOCUMENT,