diff --git a/app/controllers/api/migrations.php b/app/controllers/api/migrations.php index d5d0ebdf87..44a0a64fe4 100644 --- a/app/controllers/api/migrations.php +++ b/app/controllers/api/migrations.php @@ -589,25 +589,13 @@ Http::post('/v1/migrations/csv/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', []), -// idAttributeType: $dbForProject->getAdapter()->getIdAttributeType(), -// supportForAttributes: !$isSchemaless, -// ); -// -// if (!$validator->isValid($parsedQueries)) { -// throw new Exception(Exception::GENERAL_QUERY_INVALID, $validator->getDescription()); -// } - - shmuel - $context = new QueryContext(); $context->add($collection); $validator = new DocumentsValidator( $context, idAttributeType: $dbForProject->getAdapter()->getIdAttributeType(), + supportForAttributes: !$isSchemaless, ); if (!$validator->isValid($parsedQueries)) {