You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
-- Platform question bank extension. Execute after 2026-09-15-exam.sql.
|
|
|
|
|
|
-- Existing teacher questions remain usable and are classified as TEACHER.
|
|
|
|
|
|
ALTER TABLE exam_question
|
|
|
|
|
|
ADD COLUMN source_type varchar(16) NOT NULL DEFAULT 'TEACHER' COMMENT '题目来源:PLATFORM/TEACHER',
|
|
|
|
|
|
ADD COLUMN task_key varchar(128) NULL COMMENT '归属实训任务,关联 training_task.task_key';
|
|
|
|
|
|
|
|
|
|
|
|
UPDATE exam_question SET source_type='TEACHER' WHERE source_type IS NULL OR source_type='';
|
|
|
|
|
|
|
|
|
|
|
|
ALTER TABLE exam_question
|
|
|
|
|
|
ADD KEY idx_exam_question_source_task (source_type, task_key),
|
|
|
|
|
|
ADD KEY idx_exam_question_task (task_key);
|