mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
Add DESE ID to schools
- Add migration - Create one-off script `rake one_off:add_dese_ids` to add the DESE ID to schools - Update seeder to seed schools based on DESE IDs
This commit is contained in:
parent
8816fb5ebb
commit
b5badfaef5
10 changed files with 272 additions and 17 deletions
7
db/migrate/20211118143017_add_dese_id_to_school.rb
Normal file
7
db/migrate/20211118143017_add_dese_id_to_school.rb
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
class AddDeseIdToSchool < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
add_column :schools, :dese_id, :integer, default: -1, null: false
|
||||
|
||||
change_column_default :schools, :dese_id, from: -1, to: nil
|
||||
end
|
||||
end
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2021_11_16_151445) do
|
||||
ActiveRecord::Schema.define(version: 2021_11_18_143017) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pg_stat_statements"
|
||||
|
|
@ -279,6 +279,7 @@ ActiveRecord::Schema.define(version: 2021_11_16_151445) do
|
|||
t.integer "qualtrics_code"
|
||||
t.datetime "created_at", precision: 6, null: false
|
||||
t.datetime "updated_at", precision: 6, null: false
|
||||
t.integer "dese_id", null: false
|
||||
end
|
||||
|
||||
create_table "subcategories", id: :serial, force: :cascade do |t|
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ require "#{Rails.root}/app/lib/seeder"
|
|||
seeder = Seeder.new
|
||||
|
||||
seeder.seed_academic_years '2020-21', '2021-22'
|
||||
seeder.seed_districts_and_schools Rails.root.join('data', 'qualtrics_district_and_school_code_key.csv')
|
||||
seeder.seed_districts_and_schools Rails.root.join('data', 'master_list_of_schools_and_districts.csv')
|
||||
seeder.seed_sqm_framework Rails.root.join('data', 'sqm_framework.csv')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue