Clean up Next Wave/Full Circle Somerville data

This commit is contained in:
Liam Morley 2021-10-14 15:20:33 -04:00
parent dd4a7d354e
commit a9598c0c49

11
lib/tasks/one_off.rake Normal file
View file

@ -0,0 +1,11 @@
namespace :one_off
task clean_up_somerville: :environment do
combined_school = School.find_by_name 'Next Wave/Full Circle'
combined_school.update qualtrics_code: 5
full_circle = School.find_by_name 'Full Circle High School'
next_wave = School.find_by_name 'Next Wave Junior High School'
SurveyItemResponse.where(school: [full_circle, next_wave]).update! school: combined_school
full_circle.destroy
next_wave.destroy
end
end