A platform for community discussion. Free, open, simple.
FIX: don't check system uploads in migrate_to_s3 rake task
Régis Hanol9dbca41152e6
diff --git a/lib/tasks/uploads.rake b/lib/tasks/uploads.rakeindex 5a88a627e6a..f5f1455e1b4 100644--- a/lib/tasks/uploads.rake+++ b/lib/tasks/uploads.rake@@ -218,7 +218,7 @@ def migrate_to_s3puts "*" * 30 + " DRY RUN " + "*" * 30 if dry_runputs "Migrating uploads to S3 for '#{db}'..."- if Upload.where("url NOT LIKE '//%' AND url NOT LIKE '/uploads/#{db}/original/_X/%'").exists?+ if Upload.by_users.where("url NOT LIKE '//%' AND url NOT LIKE '/uploads/#{db}/original/_X/%'").exists?puts <<~TEXTSome uploads were not migrated to the new scheme. Please run these commands in the rails console