mirror of
https://github.com/edcommonwealth/Dashboard.git
synced 2026-03-07 13:38:12 -08:00
Able to create schools now
This commit is contained in:
parent
a4fddbeced
commit
865b7b17af
11 changed files with 26 additions and 19 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
module Dashboard
|
module Dashboard
|
||||||
class School < ApplicationRecord
|
class School < ApplicationRecord
|
||||||
belongs_to :district, class_name: "Dashboard::District"
|
belongs_to :dashboard_district, class_name: "Dashboard::District"
|
||||||
|
|
||||||
has_many :dashboard_survey_item_responses, dependent: :delete_all
|
has_many :dashboard_survey_item_responses, dependent: :delete_all
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
module Dashboard
|
module Dashboard
|
||||||
class SurveyItem < ApplicationRecord
|
class SurveyItem < ApplicationRecord
|
||||||
belongs_to :dashboard_scale
|
# belongs_to :dashboard_scale
|
||||||
|
|
||||||
has_one :dashboard_measure, through: dashboard_scale
|
# has_one :dashboard_measure, through: dashboard_scale
|
||||||
has_one :dashboard_subcategory, through: dashboard_measure
|
# has_one :dashboard_subcategory, through: dashboard_measure
|
||||||
|
|
||||||
has_many :dashboard_survey_item_responses
|
has_many :dashboard_survey_item_responses
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ class CreateDashboardCategories < ActiveRecord::Migration[7.1]
|
||||||
create_table :dashboard_categories do |t|
|
create_table :dashboard_categories do |t|
|
||||||
t.string :name
|
t.string :name
|
||||||
t.text :description
|
t.text :description
|
||||||
t.string :slug, unique: true
|
t.string :slug
|
||||||
t.string :category_id
|
t.string :category_id
|
||||||
t.string :short_description
|
t.string :short_description
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ class CreateDashboardSubcategories < ActiveRecord::Migration[7.1]
|
||||||
t.string :name
|
t.string :name
|
||||||
t.text :description
|
t.text :description
|
||||||
t.string :subcategory_id
|
t.string :subcategory_id
|
||||||
t.references :dashboard_category_id, null: false, foreign_key: true
|
t.references :dashboard_categories, null: false, foreign_key: true
|
||||||
|
|
||||||
t.timestamps
|
t.timestamps
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ class CreateDashboardDistricts < ActiveRecord::Migration[7.1]
|
||||||
def change
|
def change
|
||||||
create_table :dashboard_districts do |t|
|
create_table :dashboard_districts do |t|
|
||||||
t.string :name
|
t.string :name
|
||||||
t.string :slug, unique: true
|
t.string :slug
|
||||||
t.integer :qualtrics_code
|
t.integer :qualtrics_code
|
||||||
|
|
||||||
t.timestamps
|
t.timestamps
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@ class CreateDashboardSchools < ActiveRecord::Migration[7.1]
|
||||||
def change
|
def change
|
||||||
create_table :dashboard_schools do |t|
|
create_table :dashboard_schools do |t|
|
||||||
t.string :name
|
t.string :name
|
||||||
t.references :dashboard_district_id, null: false, foreign_key: true
|
t.references :dashboard_district, null: false, foreign_key: true
|
||||||
t.text :description
|
t.text :description
|
||||||
t.string :slug, unique: true
|
t.string :slug
|
||||||
t.integer :qualtrics_code
|
t.integer :qualtrics_code
|
||||||
t.integer :dese_id
|
t.integer :dese_id
|
||||||
t.boolean :is_hs
|
t.boolean :is_hs
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ class CreateDashboardElls < ActiveRecord::Migration[7.1]
|
||||||
def change
|
def change
|
||||||
create_table :dashboard_ells do |t|
|
create_table :dashboard_ells do |t|
|
||||||
t.string :designation
|
t.string :designation
|
||||||
t.string :slug, unique: true
|
t.string :slug
|
||||||
|
|
||||||
t.timestamps
|
t.timestamps
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ class CreateDashboardIncomes < ActiveRecord::Migration[7.1]
|
||||||
def change
|
def change
|
||||||
create_table :dashboard_incomes do |t|
|
create_table :dashboard_incomes do |t|
|
||||||
t.string :designation
|
t.string :designation
|
||||||
t.string :slug, unique: true
|
t.string :slug
|
||||||
|
|
||||||
t.timestamps
|
t.timestamps
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ class CreateDashboardRaces < ActiveRecord::Migration[7.1]
|
||||||
create_table :dashboard_races do |t|
|
create_table :dashboard_races do |t|
|
||||||
t.string :designation
|
t.string :designation
|
||||||
t.integer :qualtrics_code
|
t.integer :qualtrics_code
|
||||||
t.string :slug, unique: true
|
t.string :slug
|
||||||
|
|
||||||
t.timestamps
|
t.timestamps
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ class CreateDashboardSpeds < ActiveRecord::Migration[7.1]
|
||||||
def change
|
def change
|
||||||
create_table :dashboard_speds do |t|
|
create_table :dashboard_speds do |t|
|
||||||
t.string :designation
|
t.string :designation
|
||||||
t.string :slug, unique: true
|
t.string :slug
|
||||||
|
|
||||||
t.timestamps
|
t.timestamps
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# 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_01_05_040909) do
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
|
||||||
|
|
@ -47,6 +47,13 @@ ActiveRecord::Schema[7.1].define(version: 2024_01_04_192128) do
|
||||||
t.index ["dashboard_school_id"], name: "index_dashboard_admin_data_values_on_dashboard_school_id"
|
t.index ["dashboard_school_id"], name: "index_dashboard_admin_data_values_on_dashboard_school_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "dashboard_atoms", force: :cascade do |t|
|
||||||
|
t.integer "survey_item"
|
||||||
|
t.text "text"
|
||||||
|
t.datetime "created_at", null: false
|
||||||
|
t.datetime "updated_at", null: false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "dashboard_categories", force: :cascade do |t|
|
create_table "dashboard_categories", force: :cascade do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.text "description"
|
t.text "description"
|
||||||
|
|
@ -217,11 +224,11 @@ ActiveRecord::Schema[7.1].define(version: 2024_01_04_192128) do
|
||||||
t.bigint "dashboard_school_id", null: false
|
t.bigint "dashboard_school_id", null: false
|
||||||
t.bigint "dashboard_survey_item_id", null: false
|
t.bigint "dashboard_survey_item_id", null: false
|
||||||
t.bigint "dashboard_academic_year_id", null: false
|
t.bigint "dashboard_academic_year_id", null: false
|
||||||
t.bigint "dashboard_student_id", null: false
|
t.bigint "dashboard_student_id"
|
||||||
t.bigint "dashboard_gender_id", null: false
|
t.bigint "dashboard_gender_id"
|
||||||
t.bigint "dashboard_income_id", null: false
|
t.bigint "dashboard_income_id"
|
||||||
t.bigint "dashboard_ell_id", null: false
|
t.bigint "dashboard_ell_id"
|
||||||
t.bigint "dashboard_sped_id", null: false
|
t.bigint "dashboard_sped_id"
|
||||||
t.string "response_id"
|
t.string "response_id"
|
||||||
t.integer "grade"
|
t.integer "grade"
|
||||||
t.datetime "recorded_date"
|
t.datetime "recorded_date"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue