Last active
September 19, 2016 04:44
-
-
Save tomca32/6bcdc3cf1ba9c947e3b1818a67c65ea9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create_table "assignments", force: :cascade do |t| | |
t.integer "skill_id", null: false | |
t.integer "subject_id", null: false | |
t.index ["skill_id"], name: "index_assignments_on_skill_id" | |
t.index ["subject_id"], name: "index_assignments_on_subject_id" | |
end | |
create_table "grade_descriptors", force: :cascade do |t| | |
t.integer "mark", null: false | |
t.string "grade_description" | |
t.integer "skill_id", null: false | |
t.index ["mark", "skill_id"], name: "index_grade_descriptors_on_mark_and_skill_id", unique: true | |
t.index ["skill_id"], name: "index_grade_descriptors_on_skill_id" | |
end | |
create_table "grades", force: :cascade do |t| | |
t.integer "student_id", null: false | |
t.integer "lesson_id", null: false | |
t.integer "grade_descriptor_id", null: false | |
t.index ["grade_descriptor_id"], name: "index_grades_on_grade_descriptor_id" | |
t.index ["lesson_id"], name: "index_grades_on_lesson_id" | |
t.index ["student_id", "lesson_id", "grade_descriptor_id"], name: "grade_uniqueness_index", unique: true | |
t.index ["student_id"], name: "index_grades_on_student_id" | |
end | |
create_table "groups", force: :cascade do |t| | |
t.datetime "created_at", null: false | |
t.datetime "updated_at", null: false | |
t.string "group_name", default: "", null: false | |
t.integer "chapter_id" | |
t.index ["chapter_id"], name: "index_groups_on_chapter_id" | |
end | |
create_table "lessons", force: :cascade do |t| | |
t.integer "group_id", null: false | |
t.date "date", null: false | |
t.datetime "created_at", null: false | |
t.datetime "updated_at", null: false | |
t.integer "subject_id", null: false | |
t.index ["group_id"], name: "index_lessons_on_group_id" | |
t.index ["subject_id"], name: "index_lessons_on_subject_id" | |
end | |
create_table "organizations", force: :cascade do |t| | |
t.string "organization_name", null: false | |
t.datetime "created_at", null: false | |
t.datetime "updated_at", null: false | |
t.string "image", default: "https://placeholdit.imgix.net/~text?txtsize=23&txt=200%C3%97200&w=200&h=200" | |
end | |
create_table "skills", force: :cascade do |t| | |
t.string "skill_name", null: false | |
t.integer "organization_id", null: false | |
t.datetime "created_at", null: false | |
t.datetime "updated_at", null: false | |
t.text "skill_description" | |
t.index ["organization_id"], name: "index_skills_on_organization_id" | |
end | |
create_table "subjects", force: :cascade do |t| | |
t.string "subject_name", null: false | |
t.integer "organization_id", null: false | |
t.datetime "created_at", null: false | |
t.datetime "updated_at", null: false | |
t.index ["organization_id"], name: "index_subjects_on_organization_id" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment