mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 13:38:18 -08:00
Remove surveys table from codebase since it's no longer needed after changing logic surrounding response rates and score calculations
This commit is contained in:
parent
f68b650d8b
commit
596ce25737
19 changed files with 30 additions and 126 deletions
11
db/migrate/20230421034505_drop_surveys_table.rb
Normal file
11
db/migrate/20230421034505_drop_surveys_table.rb
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
class DropSurveysTable < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
drop_table :surveys do |t|
|
||||
t.integer :form
|
||||
t.references :academic_year, null: false, foreign_key: true
|
||||
t.references :school, null: false, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
14
db/schema.rb
14
db/schema.rb
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.0].define(version: 2023_03_04_132801) do
|
||||
ActiveRecord::Schema[7.0].define(version: 2023_04_21_034505) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
||||
|
|
@ -470,16 +470,6 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_04_132801) do
|
|||
t.index ["survey_item_id"], name: "index_survey_items_on_survey_item_id"
|
||||
end
|
||||
|
||||
create_table "surveys", force: :cascade do |t|
|
||||
t.integer "form"
|
||||
t.bigint "academic_year_id", null: false
|
||||
t.bigint "school_id", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["academic_year_id"], name: "index_surveys_on_academic_year_id"
|
||||
t.index ["school_id"], name: "index_surveys_on_school_id"
|
||||
end
|
||||
|
||||
add_foreign_key "admin_data_items", "scales"
|
||||
add_foreign_key "admin_data_values", "academic_years"
|
||||
add_foreign_key "admin_data_values", "admin_data_items"
|
||||
|
|
@ -513,6 +503,4 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_04_132801) do
|
|||
add_foreign_key "survey_item_responses", "students"
|
||||
add_foreign_key "survey_item_responses", "survey_items"
|
||||
add_foreign_key "survey_items", "scales"
|
||||
add_foreign_key "surveys", "academic_years"
|
||||
add_foreign_key "surveys", "schools"
|
||||
end
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ seeder = Seeder.new
|
|||
|
||||
seeder.seed_academic_years '2016-17', '2017-18', '2018-19', '2019-20', '2020-21', '2021-22', '2022-23'
|
||||
seeder.seed_districts_and_schools Rails.root.join('data', 'master_list_of_schools_and_districts.csv')
|
||||
seeder.seed_surveys Rails.root.join('data', 'master_list_of_schools_and_districts.csv')
|
||||
seeder.seed_sqm_framework Rails.root.join('data', 'sqm_framework.csv')
|
||||
seeder.seed_demographics Rails.root.join('data', 'demographics.csv')
|
||||
seeder.seed_enrollment Rails.root.join('data', 'enrollment', 'enrollment.csv')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue