dirty commit: can't get references to work correctly between any tables

This commit is contained in:
Nelson Jovel 2024-01-04 19:36:10 -08:00
parent e1f0b78236
commit a4fddbeced
183 changed files with 5461 additions and 5 deletions

View file

@ -0,0 +1,11 @@
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
end
end

View file

@ -0,0 +1,13 @@
class CreateDashboardCategories < ActiveRecord::Migration[7.1]
def change
create_table :dashboard_categories do |t|
t.string :name
t.text :description
t.string :slug, unique: true
t.string :category_id
t.string :short_description
t.timestamps
end
end
end

View file

@ -0,0 +1,12 @@
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_category_id, null: false, foreign_key: true
t.timestamps
end
end
end

View file

@ -0,0 +1,12 @@
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,10 @@
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,16 @@
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,16 @@
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,11 @@
class CreateDashboardDistricts < ActiveRecord::Migration[7.1]
def change
create_table :dashboard_districts do |t|
t.string :name
t.string :slug, unique: true
t.integer :qualtrics_code
t.timestamps
end
end
end

View file

@ -0,0 +1,15 @@
class CreateDashboardSchools < ActiveRecord::Migration[7.1]
def change
create_table :dashboard_schools do |t|
t.string :name
t.references :dashboard_district_id, null: false, foreign_key: true
t.text :description
t.string :slug, unique: true
t.integer :qualtrics_code
t.integer :dese_id
t.boolean :is_hs
t.timestamps
end
end
end

View file

@ -0,0 +1,12 @@
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
end
end

View file

@ -0,0 +1,10 @@
class CreateDashboardElls < ActiveRecord::Migration[7.1]
def change
create_table :dashboard_ells do |t|
t.string :designation
t.string :slug, unique: true
t.timestamps
end
end
end

View file

@ -0,0 +1,10 @@
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,10 @@
class CreateDashboardIncomes < ActiveRecord::Migration[7.1]
def change
create_table :dashboard_incomes do |t|
t.string :designation
t.string :slug, unique: true
t.timestamps
end
end
end

View file

@ -0,0 +1,11 @@
class CreateDashboardRaces < ActiveRecord::Migration[7.1]
def change
create_table :dashboard_races do |t|
t.string :designation
t.integer :qualtrics_code
t.string :slug, unique: true
t.timestamps
end
end
end

View file

@ -0,0 +1,26 @@
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
end
end

View file

@ -0,0 +1,13 @@
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 :school_response_rate
t.float :teacher_response_rate
t.timestamps
end
end
end

View file

@ -0,0 +1,12 @@
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,10 @@
class CreateDashboardSpeds < ActiveRecord::Migration[7.1]
def change
create_table :dashboard_speds do |t|
t.string :designation
t.string :slug, unique: true
t.timestamps
end
end
end

View file

@ -0,0 +1,10 @@
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,10 @@
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,20 @@
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
end
end