From 93b8b04b068871ccdf9592e42cc310cfc49ee5f8 Mon Sep 17 00:00:00 2001 From: Gerhard Schlager Date: Wed, 4 Mar 2020 12:46:04 +0100 Subject: [PATCH] FIX: Migrating uploads to S3 could miss files The rake task aborted the migration with "Already migrated" when all upload URLs linked to the correct S3 bucket even though the files didn't exist on S3. By removing the first check we force the rake task to check for the existance of uploads on S3. --- lib/file_store/to_s3_migration.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/file_store/to_s3_migration.rb b/lib/file_store/to_s3_migration.rb index fe2edd5a535..456e428657d 100644 --- a/lib/file_store/to_s3_migration.rb +++ b/lib/file_store/to_s3_migration.rb @@ -139,9 +139,6 @@ module FileStore # we don't want have migrated state, ensure we run all jobs here Jobs.run_immediately! - log "Checking if #{@current_db} already migrated..." - return log "Already migrated #{@current_db}!" if migration_successful? - log "*" * 30 + " DRY RUN " + "*" * 30 if @dry_run log "Migrating uploads to S3 for '#{@current_db}'..."