Upload.joins(<<~SQL).where('projects.storage_version < :version OR projects.storage_version IS NULL',version: Project::HASHED_STORAGE_FEATURES[:attachments])
puts"* Found #{projects_count} projects".color(:green)
JOIN projects
ON (uploads.model_type='Project' AND uploads.model_id=projects.id)