require 'benchmark'

time = Benchmark.realtime do
  blank_outcomes = ConsultationOutcome.all.select {|co| co.summary.blank? && co.attachments.empty? }

  puts "Deleting #{blank_outcomes.size} blank consultation outcomes"
  blank_outcomes.each do |outcome|
    outcome.destroy
    print '.'
  end
  puts "\nAll done"
end

puts time

Add data migration to clean up blank outcomes
Add data migration to clean up blank outcomes

This is legacy data, created as a result of the way nested attributes
used to be used to add/edit consultation responses.
