mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-08 23:18:18 -07:00
Add seeding & scripts for Daley 2023-24
This commit is contained in:
parent
9beb166c4a
commit
7dec0be5af
4 changed files with 67 additions and 1 deletions
|
|
@ -45,6 +45,18 @@ namespace :data do
|
|||
Rails.cache.clear
|
||||
end
|
||||
|
||||
desc 'delete non-lowell schools and districts'
|
||||
task delete_non_lowell: :environment do
|
||||
schools = School.all.reject { |s| s.district.name == 'Lowell' }
|
||||
ResponseRate.where(school: schools).delete_all
|
||||
RaceScore.where(school: schools).delete_all
|
||||
Respondent.where(school: schools).delete_all
|
||||
schools.each { |school| school.delete }
|
||||
districts = District.all.reject { |district| district.name == 'Lowell' }
|
||||
districts.each { |district| district.delete }
|
||||
end
|
||||
|
||||
|
||||
desc 'load students for lowell'
|
||||
task load_students_for_lowell: :environment do
|
||||
student_count = Student.count
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue