Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update lib/Migration/Version010000001Date20250727094721.php
Co-authored-by: Joas Schilling <[email protected]>
Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
2 people authored and backportbot[bot] committed Jul 28, 2025
commit 1e2722baf0741d6cfdb6800b78bd76a314a2fbd7
18 changes: 4 additions & 14 deletions lib/Migration/Version010000001Date20250727094721.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,9 @@ public function postSchemaChange(IOutput $output, Closure $schemaClosure, array
return;
}

$selectQuery = $this->db->getQueryBuilder();
$selectQuery->select('id', 'vector')
->from('recognize_face_detections');
$updateQuery = $this->db->getQueryBuilder();
$updateQuery->update('recognize_face_detections')
->set('face_vector', $updateQuery->createParameter('face_vector'))
->where($updateQuery->expr()->eq('id', $updateQuery->createParameter('id')));
$result = $selectQuery->executeQuery();
while ($row = $result->fetch()) {
$updateQuery->setParameter('id', $row['id']);
$updateQuery->setParameter('face_vector', $row['vector']);
$updateQuery->executeStatement();
}
$result->closeCursor();
$query = $this->db->getQueryBuilder();
$query->update('recognize_face_detections')
->set('face_vector', 'vector');
$query->executeStatement();
}
}
Loading