mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
Extract legacy parts of the codebase into its own module
This commit is contained in:
parent
cf6e80ce6b
commit
413096dfe2
269 changed files with 5549 additions and 5279 deletions
181
db/schema.rb
181
db/schema.rb
|
|
@ -10,9 +10,10 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2021_11_04_181819) do
|
||||
ActiveRecord::Schema.define(version: 2021_11_16_151445) 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|
|
||||
|
|
@ -28,7 +29,26 @@ ActiveRecord::Schema.define(version: 2021_11_04_181819) do
|
|||
t.datetime "updated_at", precision: 6, null: false
|
||||
end
|
||||
|
||||
create_table "attempts", id: :serial, force: :cascade do |t|
|
||||
create_table "categories", id: :serial, force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.text "description"
|
||||
t.string "slug"
|
||||
t.integer "sort_index"
|
||||
t.datetime "created_at", precision: 6, null: false
|
||||
t.datetime "updated_at", precision: 6, null: false
|
||||
t.string "category_id", null: false
|
||||
t.index ["slug"], name: "index_categories_on_slug", unique: true
|
||||
end
|
||||
|
||||
create_table "districts", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.string "slug"
|
||||
t.integer "qualtrics_code"
|
||||
t.datetime "created_at", precision: 6, null: false
|
||||
t.datetime "updated_at", precision: 6, null: false
|
||||
end
|
||||
|
||||
create_table "legacy_attempts", id: :serial, force: :cascade do |t|
|
||||
t.integer "recipient_id"
|
||||
t.integer "schedule_id"
|
||||
t.integer "recipient_schedule_id"
|
||||
|
|
@ -43,10 +63,10 @@ ActiveRecord::Schema.define(version: 2021_11_04_181819) do
|
|||
t.text "twilio_details"
|
||||
t.string "twilio_sid"
|
||||
t.integer "student_id"
|
||||
t.index ["twilio_sid"], name: "index_attempts_on_twilio_sid"
|
||||
t.index ["twilio_sid"], name: "index_legacy_attempts_on_twilio_sid"
|
||||
end
|
||||
|
||||
create_table "categories", id: :serial, force: :cascade do |t|
|
||||
create_table "legacy_categories", id: :serial, force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.string "blurb"
|
||||
t.text "description"
|
||||
|
|
@ -58,35 +78,20 @@ ActiveRecord::Schema.define(version: 2021_11_04_181819) do
|
|||
t.float "benchmark"
|
||||
t.string "benchmark_description"
|
||||
t.string "zones"
|
||||
t.index ["slug"], name: "index_categories_on_slug", unique: true
|
||||
t.index ["slug"], name: "index_legacy_categories_on_slug", unique: true
|
||||
end
|
||||
|
||||
create_table "districts", id: :serial, force: :cascade do |t|
|
||||
create_table "legacy_districts", id: :serial, force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.integer "state_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.string "slug"
|
||||
t.integer "qualtrics_code"
|
||||
t.index ["slug"], name: "index_districts_on_slug", unique: true
|
||||
t.index ["slug"], name: "index_legacy_districts_on_slug", unique: true
|
||||
end
|
||||
|
||||
create_table "measures", id: :serial, force: :cascade do |t|
|
||||
t.string "measure_id", null: false
|
||||
t.string "name"
|
||||
t.float "watch_low_benchmark"
|
||||
t.float "growth_low_benchmark"
|
||||
t.float "approval_low_benchmark"
|
||||
t.float "ideal_low_benchmark"
|
||||
t.integer "subcategory_id", null: false
|
||||
t.text "description"
|
||||
t.datetime "created_at", precision: 6, null: false
|
||||
t.datetime "updated_at", precision: 6, null: false
|
||||
t.index ["measure_id"], name: "index_measures_on_measure_id"
|
||||
t.index ["subcategory_id"], name: "index_measures_on_subcategory_id"
|
||||
end
|
||||
|
||||
create_table "question_lists", id: :serial, force: :cascade do |t|
|
||||
create_table "legacy_question_lists", id: :serial, force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.text "description"
|
||||
t.text "question_ids"
|
||||
|
|
@ -94,7 +99,7 @@ ActiveRecord::Schema.define(version: 2021_11_04_181819) do
|
|||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "questions", id: :serial, force: :cascade do |t|
|
||||
create_table "legacy_questions", id: :serial, force: :cascade do |t|
|
||||
t.string "text"
|
||||
t.string "option1"
|
||||
t.string "option2"
|
||||
|
|
@ -110,17 +115,17 @@ ActiveRecord::Schema.define(version: 2021_11_04_181819) do
|
|||
t.string "external_id"
|
||||
end
|
||||
|
||||
create_table "recipient_lists", id: :serial, force: :cascade do |t|
|
||||
create_table "legacy_recipient_lists", id: :serial, force: :cascade do |t|
|
||||
t.integer "school_id"
|
||||
t.string "name"
|
||||
t.text "description"
|
||||
t.text "recipient_ids"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["school_id"], name: "index_recipient_lists_on_school_id"
|
||||
t.index ["school_id"], name: "index_legacy_recipient_lists_on_school_id"
|
||||
end
|
||||
|
||||
create_table "recipient_schedules", id: :serial, force: :cascade do |t|
|
||||
create_table "legacy_recipient_schedules", id: :serial, force: :cascade do |t|
|
||||
t.integer "recipient_id"
|
||||
t.integer "schedule_id"
|
||||
t.text "upcoming_question_ids"
|
||||
|
|
@ -132,7 +137,7 @@ ActiveRecord::Schema.define(version: 2021_11_04_181819) do
|
|||
t.string "queued_question_ids"
|
||||
end
|
||||
|
||||
create_table "recipients", id: :serial, force: :cascade do |t|
|
||||
create_table "legacy_recipients", id: :serial, force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.string "phone"
|
||||
t.date "birth_date"
|
||||
|
|
@ -150,11 +155,11 @@ ActiveRecord::Schema.define(version: 2021_11_04_181819) do
|
|||
t.integer "attempts_count", default: 0
|
||||
t.integer "responses_count", default: 0
|
||||
t.string "teacher"
|
||||
t.index ["phone"], name: "index_recipients_on_phone"
|
||||
t.index ["slug"], name: "index_recipients_on_slug", unique: true
|
||||
t.index ["phone"], name: "index_legacy_recipients_on_phone"
|
||||
t.index ["slug"], name: "index_legacy_recipients_on_slug", unique: true
|
||||
end
|
||||
|
||||
create_table "schedules", id: :serial, force: :cascade do |t|
|
||||
create_table "legacy_schedules", id: :serial, force: :cascade do |t|
|
||||
t.integer "school_id"
|
||||
t.string "name"
|
||||
t.text "description"
|
||||
|
|
@ -168,10 +173,10 @@ ActiveRecord::Schema.define(version: 2021_11_04_181819) do
|
|||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.integer "time", default: 960
|
||||
t.index ["school_id"], name: "index_schedules_on_school_id"
|
||||
t.index ["school_id"], name: "index_legacy_schedules_on_school_id"
|
||||
end
|
||||
|
||||
create_table "school_categories", id: :serial, force: :cascade do |t|
|
||||
create_table "legacy_school_categories", id: :serial, force: :cascade do |t|
|
||||
t.integer "school_id"
|
||||
t.integer "category_id"
|
||||
t.integer "attempt_count", default: 0
|
||||
|
|
@ -184,11 +189,11 @@ ActiveRecord::Schema.define(version: 2021_11_04_181819) do
|
|||
t.string "year"
|
||||
t.integer "valid_child_count"
|
||||
t.integer "response_rate"
|
||||
t.index ["category_id"], name: "index_school_categories_on_category_id"
|
||||
t.index ["school_id"], name: "index_school_categories_on_school_id"
|
||||
t.index ["category_id"], name: "index_legacy_school_categories_on_category_id"
|
||||
t.index ["school_id"], name: "index_legacy_school_categories_on_school_id"
|
||||
end
|
||||
|
||||
create_table "school_questions", id: :serial, force: :cascade do |t|
|
||||
create_table "legacy_school_questions", id: :serial, force: :cascade do |t|
|
||||
t.integer "school_id"
|
||||
t.integer "question_id"
|
||||
t.integer "school_category_id"
|
||||
|
|
@ -201,7 +206,7 @@ ActiveRecord::Schema.define(version: 2021_11_04_181819) do
|
|||
t.integer "response_total"
|
||||
end
|
||||
|
||||
create_table "schools", id: :serial, force: :cascade do |t|
|
||||
create_table "legacy_schools", id: :serial, force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.integer "district_id"
|
||||
t.datetime "created_at", null: false
|
||||
|
|
@ -211,21 +216,10 @@ ActiveRecord::Schema.define(version: 2021_11_04_181819) do
|
|||
t.integer "student_count"
|
||||
t.integer "teacher_count"
|
||||
t.integer "qualtrics_code"
|
||||
t.index ["slug"], name: "index_schools_on_slug", unique: true
|
||||
t.index ["slug"], name: "index_legacy_schools_on_slug", unique: true
|
||||
end
|
||||
|
||||
create_table "sqm_categories", id: :serial, force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.text "description"
|
||||
t.string "slug"
|
||||
t.integer "sort_index"
|
||||
t.datetime "created_at", precision: 6, null: false
|
||||
t.datetime "updated_at", precision: 6, null: false
|
||||
t.string "category_id", null: false
|
||||
t.index ["slug"], name: "index_sqm_categories_on_slug", unique: true
|
||||
end
|
||||
|
||||
create_table "students", id: :serial, force: :cascade do |t|
|
||||
create_table "legacy_students", id: :serial, force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.string "teacher"
|
||||
t.date "birthdate"
|
||||
|
|
@ -237,9 +231,59 @@ ActiveRecord::Schema.define(version: 2021_11_04_181819) do
|
|||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "legacy_user_schools", id: :serial, force: :cascade do |t|
|
||||
t.integer "user_id"
|
||||
t.integer "school_id"
|
||||
t.integer "district_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "legacy_users", id: :serial, force: :cascade do |t|
|
||||
t.string "email", default: "", null: false
|
||||
t.string "encrypted_password", default: "", null: false
|
||||
t.string "reset_password_token"
|
||||
t.datetime "reset_password_sent_at"
|
||||
t.datetime "remember_created_at"
|
||||
t.integer "sign_in_count", default: 0, null: false
|
||||
t.datetime "current_sign_in_at"
|
||||
t.datetime "last_sign_in_at"
|
||||
t.inet "current_sign_in_ip"
|
||||
t.inet "last_sign_in_ip"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["email"], name: "index_legacy_users_on_email", unique: true
|
||||
t.index ["reset_password_token"], name: "index_legacy_users_on_reset_password_token", unique: true
|
||||
end
|
||||
|
||||
create_table "measures", id: :serial, force: :cascade do |t|
|
||||
t.string "measure_id", null: false
|
||||
t.string "name"
|
||||
t.float "watch_low_benchmark"
|
||||
t.float "growth_low_benchmark"
|
||||
t.float "approval_low_benchmark"
|
||||
t.float "ideal_low_benchmark"
|
||||
t.integer "subcategory_id", null: false
|
||||
t.text "description"
|
||||
t.datetime "created_at", precision: 6, null: false
|
||||
t.datetime "updated_at", precision: 6, null: false
|
||||
t.index ["measure_id"], name: "index_measures_on_measure_id"
|
||||
t.index ["subcategory_id"], name: "index_measures_on_subcategory_id"
|
||||
end
|
||||
|
||||
create_table "schools", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.integer "district_id"
|
||||
t.text "description"
|
||||
t.string "slug"
|
||||
t.integer "qualtrics_code"
|
||||
t.datetime "created_at", precision: 6, null: false
|
||||
t.datetime "updated_at", precision: 6, null: false
|
||||
end
|
||||
|
||||
create_table "subcategories", id: :serial, force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.integer "sqm_category_id"
|
||||
t.integer "category_id"
|
||||
t.text "description"
|
||||
t.datetime "created_at", precision: 6, null: false
|
||||
t.datetime "updated_at", precision: 6, null: false
|
||||
|
|
@ -270,38 +314,13 @@ ActiveRecord::Schema.define(version: 2021_11_04_181819) do
|
|||
t.index ["survey_item_id"], name: "index_survey_items_on_survey_item_id"
|
||||
end
|
||||
|
||||
create_table "user_schools", id: :serial, force: :cascade do |t|
|
||||
t.integer "user_id"
|
||||
t.integer "school_id"
|
||||
t.integer "district_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "users", id: :serial, force: :cascade do |t|
|
||||
t.string "email", default: "", null: false
|
||||
t.string "encrypted_password", default: "", null: false
|
||||
t.string "reset_password_token"
|
||||
t.datetime "reset_password_sent_at"
|
||||
t.datetime "remember_created_at"
|
||||
t.integer "sign_in_count", default: 0, null: false
|
||||
t.datetime "current_sign_in_at"
|
||||
t.datetime "last_sign_in_at"
|
||||
t.inet "current_sign_in_ip"
|
||||
t.inet "last_sign_in_ip"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["email"], name: "index_users_on_email", unique: true
|
||||
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
|
||||
end
|
||||
|
||||
add_foreign_key "admin_data_items", "measures"
|
||||
add_foreign_key "legacy_recipient_lists", "legacy_schools", column: "school_id"
|
||||
add_foreign_key "legacy_schedules", "legacy_schools", column: "school_id"
|
||||
add_foreign_key "legacy_school_categories", "legacy_categories", column: "category_id"
|
||||
add_foreign_key "legacy_school_categories", "legacy_schools", column: "school_id"
|
||||
add_foreign_key "measures", "subcategories"
|
||||
add_foreign_key "recipient_lists", "schools"
|
||||
add_foreign_key "schedules", "schools"
|
||||
add_foreign_key "school_categories", "categories"
|
||||
add_foreign_key "school_categories", "schools"
|
||||
add_foreign_key "subcategories", "sqm_categories"
|
||||
add_foreign_key "subcategories", "categories"
|
||||
add_foreign_key "survey_item_responses", "academic_years"
|
||||
add_foreign_key "survey_item_responses", "schools"
|
||||
add_foreign_key "survey_item_responses", "survey_items"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue