Skip to content

Commit

Permalink
pkp#6724 Make large upgrade installations more reliable (pkp#6724 (co…
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Jun 17, 2021
1 parent 50a8e89 commit b20eb38
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions classes/migration/upgrade/PKPv3_3_0UpgradeMigration.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -403,12 +403,9 @@ private function _migrateSubmissionFiles() {

// Get all the unique file_ids. For each one, determine the latest revision
// in order to keep it in the table. The others will be flagged for removal
$revisionRowFileIds = Capsule::table('submission_files')
->groupBy('file_id')
->pluck('file_id');
foreach ($revisionRowFileIds as $revisionRowFileId) {
foreach (Capsule::table('submission_files')->select('file_id')->distinct()->get() as $row) {
$submissionFileRows = Capsule::table('submission_files')
->where('file_id', '=', $revisionRowFileId)
->where('file_id', '=', $row->file_id)
->orderBy('revision', 'desc')
->get([
'file_id',
Expand Down

0 comments on commit b20eb38

Please sign in to comment.