chore: make sure CSV and File objects are properly namespaced

This commit is contained in:
Nelson Jovel 2024-02-07 15:39:27 -08:00
parent a99ed183a1
commit ed1310f93c
34 changed files with 327 additions and 27 deletions

View file

@ -0,0 +1,12 @@
# This migration comes from dashboard (originally 20240103232412)
class CreateDashboardAcademicYears < ActiveRecord::Migration[7.1]
def change
create_table :dashboard_academic_years do |t|
t.string :range
t.timestamps
end
add_index :dashboard_academic_years, :range, unique: true
end
end

View file

@ -0,0 +1,14 @@
# This migration comes from dashboard (originally 20240103233517)
class CreateDashboardCategories < ActiveRecord::Migration[7.1]
def change
create_table :dashboard_categories do |t|
t.string :name
t.text :description
t.string :slug
t.string :category_id
t.string :short_description
t.timestamps
end
end
end

View file

@ -0,0 +1,13 @@
# This migration comes from dashboard (originally 20240104005325)
class CreateDashboardSubcategories < ActiveRecord::Migration[7.1]
def change
create_table :dashboard_subcategories do |t|
t.string :name
t.text :description
t.string :subcategory_id
t.references :dashboard_categories, null: false, foreign_key: true
t.timestamps
end
end
end

View file

@ -0,0 +1,13 @@
# This migration comes from dashboard (originally 20240104170806)
class CreateDashboardMeasures < ActiveRecord::Migration[7.1]
def change
create_table :dashboard_measures do |t|
t.string :measure_id
t.string :name
t.references :dashboard_subcategory, null: false, foreign_key: true
t.text :description
t.timestamps
end
end
end

View file

@ -0,0 +1,11 @@
# This migration comes from dashboard (originally 20240104170957)
class CreateDashboardScales < ActiveRecord::Migration[7.1]
def change
create_table :dashboard_scales do |t|
t.string :scale_id
t.references :dashboard_measure, null: false, foreign_key: true
t.timestamps
end
end
end

View file

@ -0,0 +1,17 @@
# This migration comes from dashboard (originally 20240104172921)
class CreateDashboardSurveyItems < ActiveRecord::Migration[7.1]
def change
create_table :dashboard_survey_items do |t|
t.string :survey_item_id
t.string :prompt
t.float :watch_low_benchmark
t.float :growth_low_benchmark
t.float :approval_low_benchmark
t.float :ideal_low_benchmark
t.references :dashboard_scale, null: false, foreign_key: true
t.boolean :on_short_form
t.timestamps
end
end
end

View file

@ -0,0 +1,17 @@
# This migration comes from dashboard (originally 20240104173424)
class CreateDashboardAdminDataItems < ActiveRecord::Migration[7.1]
def change
create_table :dashboard_admin_data_items do |t|
t.string :admin_data_item_id
t.string :description
t.float :watch_low_benchmark
t.float :growth_low_benchmark
t.float :approval_low_benchmark
t.float :ideal_low_benchmark
t.boolean :hs_only_item
t.references :dashboard_scale, null: false, foreign_key: true
t.timestamps
end
end
end

View file

@ -0,0 +1,12 @@
# This migration comes from dashboard (originally 20240104173931)
class CreateDashboardDistricts < ActiveRecord::Migration[7.1]
def change
create_table :dashboard_districts do |t|
t.string :name
t.string :slug
t.integer :qualtrics_code
t.timestamps
end
end
end

View file

@ -0,0 +1,17 @@
# This migration comes from dashboard (originally 20240104174053)
class CreateDashboardSchools < ActiveRecord::Migration[7.1]
def change
create_table :dashboard_schools do |t|
t.string :name
t.references :dashboard_district, null: false, foreign_key: true
t.string :slug
t.integer :qualtrics_code
t.integer :dese_id
t.boolean :is_hs
t.timestamps
end
add_index :dashboard_schools, :dese_id, unique: true
end
end

View file

@ -0,0 +1,16 @@
# This migration comes from dashboard (originally 20240104174331)
class CreateDashboardAdminDataValues < ActiveRecord::Migration[7.1]
def change
create_table :dashboard_admin_data_values do |t|
t.float :likert_score
t.references :dashboard_school, null: false, foreign_key: true
t.references :dashboard_admin_data_item, null: false, foreign_key: true
t.references :dashboard_academic_year, null: false, foreign_key: true
t.timestamps
end
add_index :dashboard_admin_data_values,
%i[dashboard_admin_data_item_id dashboard_school_id dashboard_academic_year_id], unique: true
end
end

View file

@ -0,0 +1,11 @@
# This migration comes from dashboard (originally 20240104174458)
class CreateDashboardElls < ActiveRecord::Migration[7.1]
def change
create_table :dashboard_ells do |t|
t.string :designation
t.string :slug
t.timestamps
end
end
end

View file

@ -0,0 +1,11 @@
# This migration comes from dashboard (originally 20240104174606)
class CreateDashboardGenders < ActiveRecord::Migration[7.1]
def change
create_table :dashboard_genders do |t|
t.integer :qualtrics_code
t.string :designation
t.timestamps
end
end
end

View file

@ -0,0 +1,11 @@
# This migration comes from dashboard (originally 20240104174649)
class CreateDashboardIncomes < ActiveRecord::Migration[7.1]
def change
create_table :dashboard_incomes do |t|
t.string :designation
t.string :slug
t.timestamps
end
end
end

View file

@ -0,0 +1,12 @@
# This migration comes from dashboard (originally 20240104181033)
class CreateDashboardRaces < ActiveRecord::Migration[7.1]
def change
create_table :dashboard_races do |t|
t.string :designation
t.integer :qualtrics_code
t.string :slug
t.timestamps
end
end
end

View file

@ -0,0 +1,29 @@
# This migration comes from dashboard (originally 20240104181617)
class CreateDashboardRespondents < ActiveRecord::Migration[7.1]
def change
create_table :dashboard_respondents do |t|
t.references :dashboard_school, null: false, foreign_key: true
t.references :dashboard_academic_year, null: false, foreign_key: true
t.integer :total_students
t.float :total_teachers
t.integer :pk
t.integer :k
t.integer :one
t.integer :two
t.integer :three
t.integer :four
t.integer :five
t.integer :six
t.integer :seven
t.integer :eight
t.integer :nine
t.integer :ten
t.integer :eleven
t.integer :twelve
t.timestamps
end
add_index :dashboard_respondents, %i[dashboard_school_id dashboard_academic_year_id], unique: true
end
end

View file

@ -0,0 +1,14 @@
# This migration comes from dashboard (originally 20240104181856)
class CreateDashboardResponseRates < ActiveRecord::Migration[7.1]
def change
create_table :dashboard_response_rates do |t|
t.references :dashboard_subcategory, null: false, foreign_key: true
t.references :dashboard_school, null: false, foreign_key: true
t.references :dashboard_academic_year, null: false, foreign_key: true
t.float :student_response_rate
t.float :teacher_response_rate
t.timestamps
end
end
end

View file

@ -0,0 +1,13 @@
# This migration comes from dashboard (originally 20240104183857)
class CreateDashboardScores < ActiveRecord::Migration[7.1]
def change
create_table :dashboard_scores do |t|
t.float :average
t.boolean :meets_teacher_threshold
t.boolean :meets_student_threshold
t.boolean :meets_admin_data_threshold
t.timestamps
end
end
end

View file

@ -0,0 +1,11 @@
# This migration comes from dashboard (originally 20240104183934)
class CreateDashboardSpeds < ActiveRecord::Migration[7.1]
def change
create_table :dashboard_speds do |t|
t.string :designation
t.string :slug
t.timestamps
end
end
end

View file

@ -0,0 +1,11 @@
# This migration comes from dashboard (originally 20240104184053)
class CreateDashboardStudents < ActiveRecord::Migration[7.1]
def change
create_table :dashboard_students do |t|
t.string :lasid
t.string :response_id
t.timestamps
end
end
end

View file

@ -0,0 +1,11 @@
# This migration comes from dashboard (originally 20240104190838)
class CreateDashboardStudentRaces < ActiveRecord::Migration[7.1]
def change
create_table :dashboard_student_races do |t|
t.references :dashboard_student, null: false, foreign_key: true
t.references :dashboard_race, null: false, foreign_key: true
t.timestamps
end
end
end

View file

@ -0,0 +1,24 @@
# This migration comes from dashboard (originally 20240104192128)
class CreateDashboardSurveyItemResponses < ActiveRecord::Migration[7.1]
def change
create_table :dashboard_survey_item_responses do |t|
t.integer :likert_score
t.references :dashboard_school, null: false, foreign_key: true
t.references :dashboard_survey_item, null: false, foreign_key: true
t.references :dashboard_academic_year, null: false, foreign_key: true
t.references :dashboard_student, foreign_key: true
t.references :dashboard_gender, foreign_key: true
t.references :dashboard_income, foreign_key: true
t.references :dashboard_ell, foreign_key: true
t.references :dashboard_sped, foreign_key: true
t.string :response_id
t.integer :grade
t.datetime :recorded_date
t.timestamps
end
add_index :dashboard_survey_item_responses, %i[dashboard_school_id dashboard_academic_year_id]
add_index :dashboard_survey_item_responses,
%i[response_id dashboard_school_id dashboard_academic_year_id dashboard_survey_item_id], unique: true
end
end

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.1].define(version: 2024_01_04_192128) do
ActiveRecord::Schema[7.1].define(version: 2024_02_07_230541) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"