From de219de31d63750d91af67a36a80cba028d44f2b Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Mon, 30 Mar 2026 15:26:09 +0100 Subject: [PATCH] fix: restore original databasetype block in CSV export --- app/controllers/api/migrations.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controllers/api/migrations.php b/app/controllers/api/migrations.php index a3cb294565..bccd2fde41 100644 --- a/app/controllers/api/migrations.php +++ b/app/controllers/api/migrations.php @@ -566,6 +566,10 @@ Http::post('/v1/migrations/csv/exports') throw new Exception(Exception::COLLECTION_NOT_FOUND); } + // getting databasetype + $resources = explode(':', $resourceId); + $databaseId = $resources[0]; + $database = $authorization->skip(fn () => $dbForProject->getDocument('databases', $databaseId)); $databaseType = $database->getAttribute('type'); if (!in_array($databaseType, CSV_ALLOWED_DATABASE_TYPES)) { throw new Exception(Exception::MIGRATION_DATABASE_TYPE_UNSUPPORTED, 'Database type not supported for csv');