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.
dianshang-houduan/docs/sql/2026-09-22-platform-questio...

12 lines
612 B
SQL

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

-- 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);