1.3.15.sql 1.1 KB

12345678910111213141516171819202122232425
  1. -- 1.3.15
  2. USE `stmms_ft`;
  3. ALTER TABLE m_reject_history ADD INDEX index2(`library_id`);
  4. ALTER TABLE eb_inspect_history MODIFY column inspector_id INT (11) NOT NULL COMMENT '复核人ID';
  5. ALTER TABLE eb_inspect_history MODIFY column student_id INT (11) NOT NULL COMMENT '考生ID';
  6. ALTER TABLE eb_selective_group MODIFY column score_policy varchar(64) NOT NULL COMMENT '合分方式';
  7. ALTER TABLE eb_selective_student ADD COLUMN `not_selective` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否未选做';
  8. -- 更新选做题未选做数据
  9. update eb_selective_student set not_selective=1 where student_id
  10. in(
  11. select tem.student_id from
  12. (
  13. select
  14. e.student_id,
  15. sg.selective_index,
  16. sum(case when e.group_score != -1 then 1 else 0 end) cc
  17. from eb_subjective_score e
  18. left join eb_mark_group mg on e.exam_id=mg.exam_id and e.subject_code=mg.subject_code and e.group_number=mg.number
  19. left join eb_selective_group sg on sg.exam_id=e.exam_id and sg.subject_code=e.subject_code and sg.main_number=e.main_number
  20. where mg.is_selective=1
  21. GROUP BY e.student_id,sg.selective_index
  22. )tem where tem.cc=0
  23. );