ALTER TABLE `exam_detail`
    ADD COLUMN `backup_count` DOUBLE NULL COMMENT '试卷、题卡备份数量（0-1为按比例，大于等于1为按数量）' AFTER `print_count`;

update exam_detail ed set ed.backup_count = (select backup_count from exam_print_plan epp where ed.print_plan_id = epp.id) where ed.id > 0;

ALTER TABLE `exam_print_plan`
    CHANGE COLUMN `backup_count` `backup_count` DOUBLE NOT NULL COMMENT '试卷、题卡备份数量（0-1为按比例，大于等于1为按数量）' ;

ALTER TABLE `basic_print_config`
    CHANGE COLUMN `backup_count` `backup_count` DOUBLE NULL DEFAULT NULL COMMENT '试卷、题卡备份数量（0-1为按比例，大于等于1为按数量）' ;
