diff --git a/src/Migration/Destinations/Appwrite.php b/src/Migration/Destinations/Appwrite.php index 83ed0128d0..bd899514d7 100644 --- a/src/Migration/Destinations/Appwrite.php +++ b/src/Migration/Destinations/Appwrite.php @@ -3316,12 +3316,9 @@ class Appwrite extends Destination } /** - * Direct DB write rather than the SDK's updateEmailTemplate — the SDK path - * rejects the call unless custom SMTP is enabled on the project. Templates - * may legitimately migrate before SMTP (different groups, different runs), - * so bypass that check by writing the project.templates map directly. - * Read-then-merge preserves any templates already configured on the - * destination (other locales, untouched template types). + * Direct DB write rather than the SDK's updateEmailTemplate, which rejects + * the call unless custom SMTP is enabled — templates may migrate before SMTP. + * Read-then-merge preserves templates already on the destination. */ protected function createEmailTemplate(EmailTemplate $resource): bool { diff --git a/src/Migration/Sources/Appwrite.php b/src/Migration/Sources/Appwrite.php index 9a1c1fa94b..24c182d2c1 100644 --- a/src/Migration/Sources/Appwrite.php +++ b/src/Migration/Sources/Appwrite.php @@ -1622,8 +1622,7 @@ class Appwrite extends Source if (\in_array(Resource::TYPE_PROJECT_EMAIL_TEMPLATE, $resources)) { try { - // listEmailTemplates is paginated by limit/offset (not cursor); pass total: true - // so the report count is accurate even if the page is empty. + // total:true returns the real count without fetching every row. $report[Resource::TYPE_PROJECT_EMAIL_TEMPLATE] = $this->project->listEmailTemplates([Query::limit(1)], total: true)->total; } catch (\Throwable) { $report[Resource::TYPE_PROJECT_EMAIL_TEMPLATE] = 0; @@ -1853,9 +1852,8 @@ class Appwrite extends Source */ private function exportEmailTemplates(int $batchSize): void { - // listEmailTemplates is offset-paginated (cursor not supported — the list is - // assembled from a project attribute map, not a collection). Walk the offset - // until a page comes back smaller than the requested limit. + // Offset pagination: templates come from a project attribute map, not a + // collection, so cursor pagination isn't available here. $offset = 0; while (true) {