FIX: don't check system uploads in migrate_to_s3 rake task

This commit is contained in:
Régis Hanol 2019-03-18 11:01:18 +01:00
parent 5e410dc5e0
commit 9dbca41152

View File

@ -218,7 +218,7 @@ def migrate_to_s3
puts "*" * 30 + " DRY RUN " + "*" * 30 if dry_run
puts "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 <<~TEXT
Some uploads were not migrated to the new scheme. Please run these commands in the rails console