Fix confusing ENV in `migrate_to_s3` rake task.

Fix confusing ENV in migrate_to_s3 rake task.

diff --git a/lib/tasks/uploads.rake b/lib/tasks/uploads.rake
index 6dc6c85..3bc5879 100644
--- a/lib/tasks/uploads.rake
+++ b/lib/tasks/uploads.rake
@@ -278,13 +278,7 @@ def migrate_to_s3
   print " - Listing S3 files"
 
   s3_objects = []
-
-  prefix =
-    if ENV["SKIP_MULTISITE_PREFIX"] || Rails.configuration.multisite
-      "uploads/#{db}/original/"
-    else
-      "original/"
-    end
+  prefix = ENV["MIGRATE_TO_MULTISITE"] ? "uploads/#{db}/original/" : "original/"
 
   options = { bucket: bucket, prefix: folder + prefix }

GitHub sha: 433f07fc

1 Like