mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
Create response rate model
This commit is contained in:
parent
0e9acc7467
commit
61aad20cb2
4 changed files with 50 additions and 182 deletions
23
db/schema.rb
23
db/schema.rb
|
|
@ -10,9 +10,8 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.0].define(version: 2022_05_10_232626) do
|
||||
ActiveRecord::Schema[7.0].define(version: 2022_06_14_211616) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pg_stat_statements"
|
||||
enable_extension "plpgsql"
|
||||
|
||||
create_table "academic_years", id: :serial, force: :cascade do |t|
|
||||
|
|
@ -299,6 +298,22 @@ ActiveRecord::Schema[7.0].define(version: 2022_05_10_232626) do
|
|||
t.index ["school_id"], name: "index_respondents_on_school_id"
|
||||
end
|
||||
|
||||
create_table "response_rates", force: :cascade do |t|
|
||||
t.bigint "subcategory_id", null: false
|
||||
t.bigint "school_id", null: false
|
||||
t.bigint "academic_year_id", null: false
|
||||
t.float "student_response_rate"
|
||||
t.float "teacher_response_rate"
|
||||
t.boolean "meets_student_threshold"
|
||||
t.boolean "meets_teacher_threshold"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["academic_year_id"], name: "index_response_rates_on_academic_year_id"
|
||||
t.index ["school_id", "subcategory_id"], name: "index_response_rates_on_school_id_and_subcategory_id"
|
||||
t.index ["school_id"], name: "index_response_rates_on_school_id"
|
||||
t.index ["subcategory_id"], name: "index_response_rates_on_subcategory_id"
|
||||
end
|
||||
|
||||
create_table "scales", force: :cascade do |t|
|
||||
t.string "scale_id", null: false
|
||||
t.bigint "measure_id", null: false
|
||||
|
|
@ -340,6 +355,7 @@ ActiveRecord::Schema[7.0].define(version: 2022_05_10_232626) do
|
|||
t.datetime "updated_at", null: false
|
||||
t.index ["academic_year_id"], name: "index_survey_item_responses_on_academic_year_id"
|
||||
t.index ["response_id"], name: "index_survey_item_responses_on_response_id"
|
||||
t.index ["school_id", "academic_year_id"], name: "index_survey_item_responses_on_school_id_and_academic_year_id"
|
||||
t.index ["school_id"], name: "index_survey_item_responses_on_school_id"
|
||||
t.index ["survey_item_id"], name: "index_survey_item_responses_on_survey_item_id"
|
||||
end
|
||||
|
|
@ -380,6 +396,9 @@ ActiveRecord::Schema[7.0].define(version: 2022_05_10_232626) do
|
|||
add_foreign_key "measures", "subcategories"
|
||||
add_foreign_key "respondents", "academic_years"
|
||||
add_foreign_key "respondents", "schools"
|
||||
add_foreign_key "response_rates", "academic_years"
|
||||
add_foreign_key "response_rates", "schools"
|
||||
add_foreign_key "response_rates", "subcategories"
|
||||
add_foreign_key "scales", "measures"
|
||||
add_foreign_key "schools", "districts"
|
||||
add_foreign_key "subcategories", "categories"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue