Skip to content

Commit 2d3109e

Browse files
Update lib/Migration/Version010000001Date20250727094721.php
Co-authored-by: Joas Schilling <[email protected]> Signed-off-by: Marcel Klehr <[email protected]>
1 parent e8a2ed3 commit 2d3109e

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

lib/Migration/Version010000001Date20250727094721.php

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,9 @@ public function postSchemaChange(IOutput $output, Closure $schemaClosure, array
6060
return;
6161
}
6262

63-
$selectQuery = $this->db->getQueryBuilder();
64-
$selectQuery->select('id', 'vector')
65-
->from('recognize_face_detections');
66-
$updateQuery = $this->db->getQueryBuilder();
67-
$updateQuery->update('recognize_face_detections')
68-
->set('face_vector', $updateQuery->createParameter('face_vector'))
69-
->where($updateQuery->expr()->eq('id', $updateQuery->createParameter('id')));
70-
$result = $selectQuery->executeQuery();
71-
while ($row = $result->fetch()) {
72-
$updateQuery->setParameter('id', $row['id']);
73-
$updateQuery->setParameter('face_vector', $row['vector']);
74-
$updateQuery->executeStatement();
75-
}
76-
$result->closeCursor();
63+
$query = $this->db->getQueryBuilder();
64+
$query->update('recognize_face_detections')
65+
->set('face_vector', 'vector');
66+
$query->executeStatement();
7767
}
7868
}

0 commit comments

Comments
 (0)