]> git.openstreetmap.org Git - rails.git/blob - lib/tasks/migrate_traces_to_storage.rake
Merge remote-tracking branch 'upstream/pull/3458'
[rails.git] / lib / tasks / migrate_traces_to_storage.rake
1 namespace :traces do
2   desc "Migrate trace files to ActiveStorage"
3   task :migrate_to_storage => :environment do
4     Trace
5       .with_attached_file
6       .where(:file_attachment => { :id => nil })
7       .find_each(&:migrate_to_storage!)
8   end
9 end