1010#
1111# It's strongly recommended that you check this file into your version control system.
1212
13- ActiveRecord ::Schema [ 7.1 ] . define ( version : 2025_12_11_055432 ) do
13+ ActiveRecord ::Schema [ 7.1 ] . define ( version : 2026_02_09_141203 ) do
1414 create_table "active_storage_attachments" , charset : "utf8mb4" , collation : "utf8mb4_unicode_ci" , force : :cascade do |t |
1515 t . string "name" , null : false
1616 t . string "record_type" , null : false
3939 t . index [ "blob_id" , "variation_digest" ] , name : "index_active_storage_variant_records_uniqueness" , unique : true
4040 end
4141
42+ create_table "add_uuid_to_code_tags_samples" , charset : "utf8mb4" , collation : "utf8mb4_unicode_ci" , force : :cascade do |t |
43+ t . datetime "created_at" , null : false
44+ t . datetime "updated_at" , null : false
45+ end
46+
4247 create_table "badges" , charset : "utf8mb4" , collation : "utf8mb4_unicode_ci" , force : :cascade do |t |
4348 t . string "type" , null : false
4449 t . string "name" , null : false
7075 t . index [ "slug" ] , name : "index_blog_posts_on_slug" , unique : true
7176 end
7277
78+ create_table "bootcamp_chat_messages" , charset : "utf8mb4" , collation : "utf8mb4_unicode_ci" , force : :cascade do |t |
79+ t . bigint "solution_id" , null : false
80+ t . integer "author" , null : false
81+ t . text "content" , null : false
82+ t . datetime "created_at" , null : false
83+ t . datetime "updated_at" , null : false
84+ t . index [ "solution_id" ] , name : "index_bootcamp_chat_messages_on_solution_id"
85+ end
86+
7387 create_table "bootcamp_concepts" , charset : "utf8mb4" , collation : "utf8mb4_unicode_ci" , force : :cascade do |t |
7488 t . string "slug" , null : false
7589 t . bigint "parent_id"
89103 t . string "uuid" , null : false
90104 t . bigint "user_id" , null : false
91105 t . boolean "active" , default : false , null : false
92- t . text "code" , null : false
93106 t . text "description" , null : false
107+ t . text "code" , null : false
94108 t . text "tests" , size : :long , null : false
95109 t . string "name" , null : false
96110 t . integer "arity" , null : false
106120 create_table "bootcamp_drawings" , charset : "utf8mb4" , collation : "utf8mb4_unicode_ci" , force : :cascade do |t |
107121 t . bigint "user_id" , null : false
108122 t . string "uuid" , null : false
109- t . text "code" , null : false
123+ t . text "code" , size : :medium , null : false
110124 t . datetime "created_at" , null : false
111125 t . datetime "updated_at" , null : false
112126 t . string "title" , null : false
133147 t . integer "level_idx" , null : false
134148 t . datetime "created_at" , null : false
135149 t . datetime "updated_at" , null : false
150+ t . string "uuid"
136151 t . boolean "has_bonus_tasks" , default : false , null : false
137152 t . boolean "blocks_project_progression" , default : true , null : false
138153 t . boolean "blocks_level_progression" , default : true , null : false
151166 t . datetime "updated_at" , null : false
152167 t . string "youtube_id"
153168 t . string "labs_youtube_id"
169+ t . integer "part" , default : 1 , null : false
154170 end
155171
156172 create_table "bootcamp_projects" , charset : "utf8mb4" , collation : "utf8mb4_unicode_ci" , force : :cascade do |t |
161177 t . text "introduction_html" , null : false
162178 t . datetime "created_at" , null : false
163179 t . datetime "updated_at" , null : false
180+ t . string "uuid"
164181 end
165182
166183 create_table "bootcamp_settings" , charset : "utf8mb4" , collation : "utf8mb4_unicode_ci" , force : :cascade do |t |
173190 t . bigint "user_id"
174191 t . bigint "exercise_id"
175192 t . string "uuid" , null : false
176- t . text "code" , null : false
193+ t . text "code" , size : :medium , null : false
177194 t . datetime "completed_at"
178195 t . datetime "created_at" , null : false
179196 t . datetime "updated_at" , null : false
190207 t . string "uuid" , null : false
191208 t . bigint "solution_id"
192209 t . integer "status" , limit : 2 , null : false
193- t . text "code" , null : false
210+ t . text "code" , size : :medium , null : false
194211 t . text "readonly_ranges" , null : false
195212 t . text "test_results" , null : false
196213 t . datetime "created_at" , null : false
280297 t . index [ "watch_id" , "exercise_id" ] , name : "index_community_videos_on_watch_id_and_exercise_id" , unique : true
281298 end
282299
300+ create_table "conversations" , charset : "utf8mb4" , collation : "utf8mb4_unicode_ci" , force : :cascade do |t |
301+ t . datetime "created_at" , null : false
302+ t . datetime "updated_at" , null : false
303+ end
304+
305+ create_table "course_enrollments" , charset : "utf8mb4" , collation : "utf8mb4_unicode_ci" , force : :cascade do |t |
306+ t . bigint "user_id"
307+ t . string "name" , null : false
308+ t . string "email" , null : false
309+ t . string "course_slug" , null : false
310+ t . string "country_code_2"
311+ t . datetime "paid_at"
312+ t . string "checkout_session_id"
313+ t . string "access_code"
314+ t . datetime "created_at" , null : false
315+ t . datetime "updated_at" , null : false
316+ t . integer "email_status" , limit : 1 , default : 0 , null : false
317+ t . string "uuid" , null : false
318+ t . index [ "uuid" ] , name : "index_course_enrollments_on_uuid" , unique : true
319+ end
320+
283321 create_table "documents" , charset : "utf8mb4" , collation : "utf8mb4_unicode_ci" , force : :cascade do |t |
284322 t . string "uuid" , null : false
285323 t . bigint "track_id"
300338 t . index [ "uuid" ] , name : "index_documents_on_uuid" , unique : true
301339 end
302340
303- create_table "course_enrollments" , charset : "utf8mb4" , collation : "utf8mb4_unicode_ci" , force : :cascade do |t |
304- t . bigint "user_id"
305- t . string "name" , null : false
306- t . string "email" , null : false
307- t . string "course_slug" , null : false
308- t . string "country_code_2"
309- t . datetime "paid_at"
310- t . string "checkout_session_id"
311- t . string "access_code"
312- t . integer "email_status" , limit : 1 , default : 0 , null : false
313- t . datetime "created_at" , null : false
314- t . datetime "updated_at" , null : false
315- t . string "uuid" , null : false
316- t . index [ "uuid" ] , name : "index_course_enrollments_on_uuid" , unique : true
317- end
318-
319341 create_table "donations_payments" , charset : "utf8mb4" , collation : "utf8mb4_unicode_ci" , force : :cascade do |t |
320342 t . bigint "user_id" , null : false
321343 t . bigint "subscription_id"
536558 end
537559
538560 create_table "exercise_tags" , charset : "utf8mb4" , collation : "utf8mb4_unicode_ci" , force : :cascade do |t |
561+ t . bigint "exercise_id" , null : false
539562 t . string "tag" , null : false
540563 t . boolean "filterable" , default : true , null : false
541- t . bigint "exercise_id" , null : false
542564 t . datetime "created_at" , null : false
543565 t . datetime "updated_at" , null : false
544566 t . index [ "exercise_id" , "tag" ] , name : "index_exercise_tags_on_exercise_id_and_tag" , unique : true
719741 t . index [ "user_id" ] , name : "index_jiki_signups_on_user_id" , unique : true
720742 end
721743
744+ create_table "localization_glossary_entries" , charset : "utf8mb4" , collation : "utf8mb4_unicode_ci" , force : :cascade do |t |
745+ t . string "locale" , null : false
746+ t . string "term" , null : false
747+ t . string "translation" , null : false
748+ t . text "llm_instructions" , null : false
749+ t . datetime "created_at" , null : false
750+ t . datetime "updated_at" , null : false
751+ t . integer "status" , default : 1 , null : false
752+ t . string "uuid" , null : false
753+ t . index [ "uuid" ] , name : "index_localization_glossary_entries_on_uuid" , unique : true
754+ end
755+
756+ create_table "localization_glossary_entry_proposals" , charset : "utf8mb4" , collation : "utf8mb4_unicode_ci" , force : :cascade do |t |
757+ t . integer "type" , null : false
758+ t . integer "status" , default : 0 , null : false
759+ t . string "uuid" , null : false
760+ t . bigint "glossary_entry_id"
761+ t . bigint "proposer_id" , null : false
762+ t . bigint "reviewer_id"
763+ t . string "term"
764+ t . string "locale"
765+ t . string "translation"
766+ t . text "llm_instructions"
767+ t . datetime "created_at" , null : false
768+ t . datetime "updated_at" , null : false
769+ t . index [ "glossary_entry_id" ] , name : "idx_on_glossary_entry_id_3c0b97fb4f"
770+ t . index [ "proposer_id" ] , name : "index_localization_glossary_entry_proposals_on_proposer_id"
771+ t . index [ "reviewer_id" ] , name : "index_localization_glossary_entry_proposals_on_reviewer_id"
772+ end
773+
774+ create_table "localization_originals" , charset : "utf8mb4" , collation : "utf8mb4_unicode_ci" , force : :cascade do |t |
775+ t . string "uuid" , null : false
776+ t . string "type" , null : false
777+ t . string "about_type"
778+ t . bigint "about_id"
779+ t . string "key" , null : false
780+ t . text "value" , null : false
781+ t . text "usage_details"
782+ t . boolean "should_translate" , default : true , null : false
783+ t . datetime "created_at" , null : false
784+ t . datetime "updated_at" , null : false
785+ t . index [ "key" ] , name : "index_localization_originals_on_key" , unique : true
786+ t . index [ "type" , "about_type" , "about_id" ] , name : "idx_on_type_about_type_about_id_13bf9a28f1"
787+ t . index [ "type" ] , name : "index_localization_originals_on_type"
788+ t . index [ "uuid" ] , name : "index_localization_originals_on_uuid" , unique : true
789+ end
790+
791+ create_table "localization_translation_proposals" , charset : "utf8mb4" , collation : "utf8mb4_unicode_ci" , force : :cascade do |t |
792+ t . string "uuid" , null : false
793+ t . bigint "translation_id" , null : false
794+ t . bigint "proposer_id" , null : false
795+ t . bigint "reviewer_id"
796+ t . integer "status" , default : 0 , null : false
797+ t . boolean "modified_from_llm" , null : false
798+ t . text "value" , null : false
799+ t . text "llm_feedback"
800+ t . datetime "created_at" , null : false
801+ t . datetime "updated_at" , null : false
802+ t . index [ "proposer_id" ] , name : "index_localization_translation_proposals_on_proposer_id"
803+ t . index [ "reviewer_id" ] , name : "index_localization_translation_proposals_on_reviewer_id"
804+ t . index [ "translation_id" ] , name : "index_localization_translation_proposals_on_translation_id"
805+ t . index [ "uuid" ] , name : "index_localization_translation_proposals_on_uuid" , unique : true
806+ end
807+
808+ create_table "localization_translations" , charset : "utf8mb4" , collation : "utf8mb4_unicode_ci" , force : :cascade do |t |
809+ t . string "uuid" , null : false
810+ t . string "locale" , null : false
811+ t . string "key" , null : false
812+ t . text "value"
813+ t . integer "status" , default : 0 , null : false
814+ t . datetime "created_at" , null : false
815+ t . datetime "updated_at" , null : false
816+ t . index [ "key" , "locale" ] , name : "index_localization_translations_on_key_and_locale" , unique : true
817+ t . index [ "uuid" ] , name : "index_localization_translations_on_uuid" , unique : true
818+ end
819+
722820 create_table "mailshots" , charset : "utf8mb4" , collation : "utf8mb4_unicode_ci" , force : :cascade do |t |
723821 t . string "slug" , null : false
724822 t . string "email_communication_preferences_key" , null : false
10711169 end
10721170
10731171 create_table "solution_tags" , charset : "utf8mb4" , collation : "utf8mb4_unicode_ci" , force : :cascade do |t |
1074- t . string "tag" , null : false
10751172 t . bigint "solution_id" , null : false
10761173 t . bigint "exercise_id" , null : false
10771174 t . bigint "user_id" , null : false
1175+ t . string "tag" , null : false
10781176 t . datetime "created_at" , null : false
10791177 t . datetime "updated_at" , null : false
10801178 t . bigint "track_id" , null : false
11201218 t . integer "latest_iteration_head_tests_status" , limit : 1 , default : 0 , null : false
11211219 t . boolean "unlocked_help" , default : false , null : false
11221220 t . bigint "published_exercise_representation_id"
1123- t . bigint "exercise_approach_id"
11241221 t . index [ "approved_by_id" ] , name : "fk_rails_4cc89d0b11"
11251222 t . index [ "created_at" , "exercise_id" ] , name : "mentor_selection_idx_1"
11261223 t . index [ "created_at" , "exercise_id" ] , name : "mentor_selection_idx_2"
1127- t . index [ "exercise_approach_id" ] , name : "index_solutions_on_exercise_approach_id"
11281224 t . index [ "exercise_id" , "approved_by_id" , "completed_at" , "mentoring_requested_at" , "id" ] , name : "mentor_selection_idx_3"
11291225 t . index [ "exercise_id" , "git_important_files_hash" ] , name : "index_solutions_on_exercise_id_and_git_important_files_hash"
11301226 t . index [ "exercise_id" , "status" , "num_stars" , "updated_at" ] , name : "solutions_ex_stat_stars_upat"
12151311 t . index [ "track_id" ] , name : "index_submission_representations_on_track_id"
12161312 end
12171313
1314+ create_table "submission_tags" , charset : "utf8mb4" , collation : "utf8mb4_unicode_ci" , force : :cascade do |t |
1315+ t . datetime "created_at" , null : false
1316+ t . datetime "updated_at" , null : false
1317+ end
1318+
12181319 create_table "submission_test_runs" , charset : "utf8mb4" , collation : "utf8mb4_unicode_ci" , force : :cascade do |t |
12191320 t . string "uuid" , null : false
12201321 t . bigint "submission_id" , null : false
12561357 t . integer "exercise_representer_version" , limit : 2 , default : 1 , null : false
12571358 t . bigint "approach_id"
12581359 t . json "tags"
1360+ t . index "`exercise_id`, `approach_id`, (json_value(`tags`, _utf8mb4'$[0]' returning char(512) null on empty))" , name : "index_submissions_exercise_approach_tags"
12591361 t . index [ "approach_id" ] , name : "index_submissions_on_approach_id"
12601362 t . index [ "exercise_id" , "git_important_files_hash" ] , name : "index_submissions_on_exercise_id_and_git_important_files_hash"
12611363 t . index [ "git_important_files_hash" , "solution_id" ] , name : "submissions-git-optimiser-2"
15261628 t . boolean "email_about_events" , default : true , null : false
15271629 t . boolean "email_about_insiders" , default : true , null : false
15281630 t . boolean "email_on_acquired_trophy_notification" , default : true , null : false
1631+ t . boolean "receive_onboarding_emails" , default : true , null : false
15291632 t . boolean "email_on_nudge_student_to_reply_in_discussion_notification" , default : true , null : false
15301633 t . boolean "email_on_nudge_mentor_to_reply_in_discussion_notification" , default : true , null : false
15311634 t . boolean "email_on_mentor_timed_out_discussion_notification" , default : true , null : false
15321635 t . boolean "email_on_student_timed_out_discussion_notification" , default : true , null : false
1533- t . boolean "receive_onboarding_emails" , default : true , null : false
15341636 t . index [ "token" ] , name : "index_user_communication_preferences_on_token"
15351637 t . index [ "user_id" ] , name : "fk_rails_65642a5510"
15361638 end
15941696 t . bigint "user_id" , null : false
15951697 t . bigint "installation_id" , null : false
15961698 t . string "repo_full_name" , null : false
1597- t . boolean "enabled" , null : false , default : true
1598- t . boolean "sync_on_iteration_creation" , null : false , default : true
1599- t . boolean "sync_exercise_files" , null : false
1600- t . integer "processing_method" , null : false , default : 1
1601- t . string "main_branch_name" , null : false , default : "main"
1699+ t . boolean "enabled" , default : true , null : false
1700+ t . boolean "sync_on_iteration_creation" , default : true , null : false
1701+ t . boolean "sync_exercise_files" , default : false , null : false
1702+ t . integer "processing_method" , default : 1 , null : false
1703+ t . string "main_branch_name" , default : "main" , null : false
16021704 t . string "commit_message_template" , null : false
16031705 t . string "path_template" , null : false
16041706 t . datetime "created_at" , null : false
18021904 t . string "video_id" , null : false
18031905 t . datetime "created_at" , null : false
18041906 t . datetime "updated_at" , null : false
1805- t . string "context"
1907+ t . string "context" , default : "0" , null : false
18061908 t . index [ "context" ] , name : "index_user_watched_videos_on_context"
18071909 t . index [ "user_id" , "video_provider" , "video_id" ] , name : "user_watched_videos_uniq" , unique : true
18081910 t . index [ "user_id" ] , name : "index_user_watched_videos_on_user_id"
18461948
18471949 add_foreign_key "active_storage_variant_records" , "active_storage_blobs" , column : "blob_id"
18481950 add_foreign_key "blog_posts" , "users" , column : "author_id"
1951+ add_foreign_key "bootcamp_chat_messages" , "bootcamp_solutions" , column : "solution_id"
18491952 add_foreign_key "bootcamp_concepts" , "bootcamp_concepts" , column : "parent_id"
18501953 add_foreign_key "bootcamp_custom_functions" , "users"
18511954 add_foreign_key "bootcamp_drawings" , "users"
18521955 add_foreign_key "bootcamp_exercise_concepts" , "bootcamp_concepts" , column : "concept_id"
18531956 add_foreign_key "bootcamp_exercise_concepts" , "bootcamp_exercises" , column : "exercise_id"
18541957 add_foreign_key "bootcamp_submissions" , "bootcamp_solutions" , column : "solution_id"
1958+ add_foreign_key "bootcamp_user_projects" , "bootcamp_projects" , column : "project_id"
1959+ add_foreign_key "bootcamp_user_projects" , "users"
18551960 add_foreign_key "cohort_memberships" , "cohorts"
18561961 add_foreign_key "cohort_memberships" , "users"
18571962 add_foreign_key "cohorts" , "tracks"
19022007 add_foreign_key "github_team_members" , "tracks"
19032008 add_foreign_key "github_team_members" , "users"
19042009 add_foreign_key "jiki_signups" , "users"
2010+ add_foreign_key "localization_glossary_entry_proposals" , "localization_glossary_entries" , column : "glossary_entry_id"
2011+ add_foreign_key "localization_glossary_entry_proposals" , "users" , column : "proposer_id"
2012+ add_foreign_key "localization_glossary_entry_proposals" , "users" , column : "reviewer_id"
2013+ add_foreign_key "localization_translation_proposals" , "localization_translations" , column : "translation_id"
2014+ add_foreign_key "localization_translation_proposals" , "users" , column : "proposer_id"
2015+ add_foreign_key "localization_translation_proposals" , "users" , column : "reviewer_id"
2016+ add_foreign_key "localization_translations" , "localization_originals" , column : "key" , primary_key : "key"
19052017 add_foreign_key "mentor_discussion_posts" , "iterations"
19062018 add_foreign_key "mentor_discussion_posts" , "mentor_discussions" , column : "discussion_id"
19072019 add_foreign_key "mentor_discussion_posts" , "users"
19322044 add_foreign_key "solution_tags" , "exercises"
19332045 add_foreign_key "solution_tags" , "solutions"
19342046 add_foreign_key "solution_tags" , "users"
1935- add_foreign_key "solutions" , "exercise_approaches"
19362047 add_foreign_key "solutions" , "exercise_representations" , column : "published_exercise_representation_id"
19372048 add_foreign_key "solutions" , "exercises"
19382049 add_foreign_key "solutions" , "iterations" , column : "published_iteration_id"
19672078 add_foreign_key "user_bootcamp_data" , "users"
19682079 add_foreign_key "user_communication_preferences" , "users"
19692080 add_foreign_key "user_dismissed_introducers" , "users"
2081+ add_foreign_key "user_github_solution_syncers" , "users"
19702082 add_foreign_key "user_mailshots" , "mailshots"
19712083 add_foreign_key "user_notifications" , "exercises"
19722084 add_foreign_key "user_notifications" , "tracks"
19892101 add_foreign_key "user_track_viewed_exercise_approaches" , "users"
19902102 add_foreign_key "user_tracks" , "tracks"
19912103 add_foreign_key "user_tracks" , "users"
1992- end
2104+ end
0 commit comments