|
10 | 10 | # |
11 | 11 | # It's strongly recommended that you check this file into your version control system. |
12 | 12 |
|
13 | | -ActiveRecord::Schema[7.1].define(version: 2025_05_15_025346) do |
| 13 | +ActiveRecord::Schema[7.1].define(version: 2025_07_24_054022) do |
14 | 14 | create_table "activity_types", charset: "utf8", collation: "utf8_unicode_ci", force: :cascade do |t| |
15 | 15 | t.string "name", null: false |
16 | 16 | t.string "abbreviation", null: false |
|
24 | 24 | t.datetime "auth_token_expiry", null: false |
25 | 25 | t.bigint "user_id" |
26 | 26 | t.string "authentication_token", null: false |
| 27 | + t.integer "token_type", default: 0, null: false |
| 28 | + t.index ["token_type"], name: "index_auth_tokens_on_token_type" |
27 | 29 | t.index ["user_id"], name: "index_auth_tokens_on_user_id" |
28 | 30 | end |
29 | 31 |
|
|
81 | 83 | t.datetime "updated_at", null: false |
82 | 84 | end |
83 | 85 |
|
| 86 | + create_table "d2l_assessment_mappings", charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t| |
| 87 | + t.bigint "unit_id", null: false |
| 88 | + t.string "org_unit_id" |
| 89 | + t.integer "grade_object_id" |
| 90 | + t.datetime "created_at", null: false |
| 91 | + t.datetime "updated_at", null: false |
| 92 | + t.index ["unit_id"], name: "index_d2l_assessment_mappings_on_unit_id", unique: true |
| 93 | + end |
| 94 | + |
84 | 95 | create_table "discussion_comments", charset: "utf8", collation: "utf8_unicode_ci", force: :cascade do |t| |
85 | 96 | t.datetime "time_started" |
86 | 97 | t.datetime "time_completed" |
|
274 | 285 | t.integer "extension_weeks" |
275 | 286 | t.string "extension_response" |
276 | 287 | t.bigint "reply_to_id" |
277 | | - t.bigint "overseer_assessment_id" |
| 288 | + t.bigint "commentable_id" |
| 289 | + t.string "commentable_type" |
278 | 290 | t.index ["assessor_id"], name: "index_task_comments_on_assessor_id" |
| 291 | + t.index ["commentable_type", "commentable_id"], name: "index_task_comments_on_commentable_type_and_commentable_id" |
279 | 292 | t.index ["discussion_comment_id"], name: "index_task_comments_on_discussion_comment_id" |
280 | | - t.index ["overseer_assessment_id"], name: "index_task_comments_on_overseer_assessment_id" |
281 | 293 | t.index ["recipient_id"], name: "fk_rails_1dbb49165b" |
282 | 294 | t.index ["reply_to_id"], name: "index_task_comments_on_reply_to_id" |
283 | 295 | t.index ["task_id"], name: "index_task_comments_on_task_id" |
|
310 | 322 | t.bigint "overseer_image_id" |
311 | 323 | t.string "tii_group_id" |
312 | 324 | t.string "moss_language" |
| 325 | + t.boolean "scorm_enabled", default: false |
| 326 | + t.boolean "scorm_allow_review", default: false |
| 327 | + t.boolean "scorm_bypass_test", default: false |
| 328 | + t.boolean "scorm_time_delay_enabled", default: false |
| 329 | + t.integer "scorm_attempt_limit", default: 0 |
| 330 | + t.boolean "tutorial_self_enrolment_enabled", default: false |
| 331 | + t.bigint "tutorial_self_enrolment_stream_id" |
313 | 332 | t.index ["abbreviation", "unit_id"], name: "index_task_definitions_on_abbreviation_and_unit_id", unique: true |
314 | 333 | t.index ["group_set_id"], name: "index_task_definitions_on_group_set_id" |
315 | 334 | t.index ["name", "unit_id"], name: "index_task_definitions_on_name_and_unit_id", unique: true |
316 | 335 | t.index ["overseer_image_id"], name: "index_task_definitions_on_overseer_image_id" |
| 336 | + t.index ["tutorial_self_enrolment_stream_id"], name: "index_task_definitions_on_tutorial_self_enrolment_stream_id" |
317 | 337 | t.index ["tutorial_stream_id"], name: "index_task_definitions_on_tutorial_stream_id" |
318 | 338 | t.index ["unit_id"], name: "index_task_definitions_on_unit_id" |
319 | 339 | end |
|
390 | 410 | t.integer "contribution_pts", default: 3 |
391 | 411 | t.integer "quality_pts", default: -1 |
392 | 412 | t.integer "extensions", default: 0, null: false |
| 413 | + t.integer "scorm_extensions", default: 0, null: false |
393 | 414 | t.index ["group_submission_id"], name: "index_tasks_on_group_submission_id" |
394 | 415 | t.index ["project_id", "task_definition_id"], name: "tasks_uniq_proj_task_def", unique: true |
395 | 416 | t.index ["project_id"], name: "index_tasks_on_project_id" |
|
406 | 427 | t.index ["period", "year"], name: "index_teaching_periods_on_period_and_year", unique: true |
407 | 428 | end |
408 | 429 |
|
| 430 | + create_table "test_attempts", charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t| |
| 431 | + t.bigint "task_id" |
| 432 | + t.datetime "attempted_time", null: false |
| 433 | + t.boolean "terminated", default: false |
| 434 | + t.boolean "completion_status", default: false |
| 435 | + t.boolean "success_status", default: false |
| 436 | + t.float "score_scaled", default: 0.0 |
| 437 | + t.text "cmi_datamodel" |
| 438 | + t.index ["task_id"], name: "index_test_attempts_on_task_id" |
| 439 | + end |
| 440 | + |
409 | 441 | create_table "tii_actions", charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t| |
410 | 442 | t.string "entity_type" |
411 | 443 | t.bigint "entity_id" |
|
547 | 579 | t.datetime "portfolio_auto_generation_date" |
548 | 580 | t.string "tii_group_context_id" |
549 | 581 | t.boolean "archived", default: false |
| 582 | + t.integer "credit_points" |
550 | 583 | t.bigint "unit_definition_id" |
| 584 | + t.text "prerequisites" |
| 585 | + t.text "corequisites" |
551 | 586 | t.index ["draft_task_definition_id"], name: "index_units_on_draft_task_definition_id" |
552 | 587 | t.index ["main_convenor_id"], name: "index_units_on_main_convenor_id" |
553 | 588 | t.index ["overseer_image_id"], name: "index_units_on_overseer_image_id" |
554 | 589 | t.index ["teaching_period_id"], name: "index_units_on_teaching_period_id" |
555 | 590 | t.index ["unit_definition_id"], name: "index_units_on_unit_definition_id" |
556 | 591 | end |
557 | 592 |
|
| 593 | + create_table "user_oauth_states", charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t| |
| 594 | + t.bigint "user_id", null: false |
| 595 | + t.string "state" |
| 596 | + t.datetime "created_at", null: false |
| 597 | + t.datetime "updated_at", null: false |
| 598 | + t.index ["state"], name: "index_user_oauth_states_on_state", unique: true |
| 599 | + t.index ["user_id"], name: "index_user_oauth_states_on_user_id" |
| 600 | + end |
| 601 | + |
| 602 | + create_table "user_oauth_tokens", charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t| |
| 603 | + t.bigint "user_id", null: false |
| 604 | + t.integer "provider", default: 0, null: false |
| 605 | + t.text "token" |
| 606 | + t.datetime "expires_at" |
| 607 | + t.datetime "created_at", null: false |
| 608 | + t.datetime "updated_at", null: false |
| 609 | + t.index ["user_id"], name: "index_user_oauth_tokens_on_user_id" |
| 610 | + end |
| 611 | + |
558 | 612 | create_table "users", charset: "utf8", collation: "utf8_unicode_ci", force: :cascade do |t| |
559 | 613 | t.string "email", default: "", null: false |
560 | 614 | t.string "encrypted_password", default: "", null: false |
|
609 | 663 | t.index ["user_id"], name: "index_webcals_on_user_id", unique: true |
610 | 664 | end |
611 | 665 |
|
| 666 | + add_foreign_key "task_definitions", "tutorial_streams", column: "tutorial_self_enrolment_stream_id" |
612 | 667 | add_foreign_key "units", "unit_definitions" |
| 668 | + add_foreign_key "user_oauth_states", "users" |
| 669 | + add_foreign_key "user_oauth_tokens", "users" |
613 | 670 | end |
0 commit comments