USE teachcloud_db;

ALTER TABLE `mark_paper` ADD COLUMN `archive` TINYINT(1) NULL DEFAULT 0 COMMENT '是否归档，1-已归档' AFTER `open_double_marking`;

CREATE TABLE `mark_archive_student`
(
    `student_id`           BIGINT(20) NOT NULL,
    `exam_id`              BIGINT(20) NULL,
    `paper_number`         VARCHAR(100) NULL,
    `student_code`         VARCHAR(45) NULL,
    `basic_student_id`     BIGINT(20) NULL,
    `sheet_urls`           MEDIUMTEXT NULL COMMENT '图片地址',
    `subjective_questions` MEDIUMTEXT NULL,
    `objective_questions`  MEDIUMTEXT NULL,
    `archive_card_id`      VARCHAR(50) NULL,
    `create_time`          BIGINT(20) NULL,
    PRIMARY KEY (`student_id`)
) COMMENT = '考生归档数据表';


CREATE TABLE `mark_archive_student_card` (
        `id` VARCHAR(50) NOT NULL,
        `card_content` MEDIUMTEXT NULL,
        PRIMARY KEY (`id`));


UPDATE `mark_student` SET `paper_type` = 'B' WHERE `id` = '539444443778908160' and student_code = '202201001274' and paper_type = 'A';
UPDATE `mark_student` SET `paper_type` = 'B' WHERE `id` = '539444443850211328' and student_code = '202201001274' and paper_type = 'A';

