From dd9d7174d58cfe9febfd9dad09690bd2c94d3da2 Mon Sep 17 00:00:00 2001 From: fogelito Date: Mon, 6 Apr 2026 19:47:05 +0300 Subject: [PATCH] Fix validation class --- app/controllers/api/migrations.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/controllers/api/migrations.php b/app/controllers/api/migrations.php index 44a0a64fe4..bf4d8b1721 100644 --- a/app/controllers/api/migrations.php +++ b/app/controllers/api/migrations.php @@ -880,9 +880,11 @@ Http::post('/v1/migrations/json/exports') // Schemaless databases (DocumentsDB, VectorsDB) allow queries on dynamic fields $isSchemaless = in_array($databaseType, [DATABASE_TYPE_DOCUMENTSDB, DATABASE_TYPE_VECTORSDB]); - $validator = new Documents( - attributes: $collection->getAttribute('attributes', []), - indexes: $collection->getAttribute('indexes', []), + $context = new QueryContext(); + $context->add($collection); + + $validator = new DocumentsValidator( + $context, idAttributeType: $dbForProject->getAdapter()->getIdAttributeType(), supportForAttributes: !$isSchemaless, );