##升级所有的表，添加唯一键：guid，通过UUID()给原来的数据赋值##
ALTER TABLE `b_attachment` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE b_attachment set guid=UUID();ALTER TABLE `b_attachment` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `b_batch` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE b_batch set guid=UUID();ALTER TABLE `b_batch` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `b_book` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE b_book set guid=UUID();ALTER TABLE `b_book` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `b_course` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE b_course set guid=UUID();ALTER TABLE `b_course` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `b_course_book` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE b_course_book set guid=UUID();ALTER TABLE `b_course_book` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `b_course_question_type` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE b_course_question_type set guid=UUID();ALTER TABLE `b_course_question_type` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `b_question_type` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE b_question_type set guid=UUID();ALTER TABLE `b_question_type` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `qr_oper_log` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE qr_oper_log set guid=UUID();ALTER TABLE `qr_oper_log` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `qr_pager_construct` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE qr_pager_construct set guid=UUID();ALTER TABLE `qr_pager_construct` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `qr_pager_construct_detail` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE qr_pager_construct_detail set guid=UUID();ALTER TABLE `qr_pager_construct_detail` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `qr_pager_construct_qtype` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE qr_pager_construct_qtype set guid=UUID();ALTER TABLE `qr_pager_construct_qtype` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `qr_pager_templet` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE qr_pager_templet set guid=UUID();ALTER TABLE `qr_pager_templet` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `qr_paper` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE qr_paper set guid=UUID();ALTER TABLE `qr_paper` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `qr_paper_batch` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE qr_paper_batch set guid=UUID();ALTER TABLE `qr_paper_batch` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `qr_paper_dbf_paper_info` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE qr_paper_dbf_paper_info set guid=UUID();ALTER TABLE `qr_paper_dbf_paper_info` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `qr_paper_paper_batch` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE qr_paper_paper_batch set guid=UUID();ALTER TABLE `qr_paper_paper_batch` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `qr_paper_rel_dbf_paper_info` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE qr_paper_rel_dbf_paper_info set guid=UUID();ALTER TABLE `qr_paper_rel_dbf_paper_info` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `qr_paper_skeleton2` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE qr_paper_skeleton2 set guid=UUID();ALTER TABLE `qr_paper_skeleton2` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `qr_paper_skeleton2_detail` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE qr_paper_skeleton2_detail set guid=UUID();ALTER TABLE `qr_paper_skeleton2_detail` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `s_code` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE s_code set guid=UUID();ALTER TABLE `s_code` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `s_menu` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE s_menu set guid=UUID();ALTER TABLE `s_menu` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `s_role` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE s_role set guid=UUID();ALTER TABLE `s_role` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `s_role_menu` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE s_role_menu set guid=UUID();ALTER TABLE `s_role_menu` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `s_sys_param` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE s_sys_param set guid=UUID();ALTER TABLE `s_sys_param` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `s_user` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE s_user set guid=UUID();ALTER TABLE `s_user` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `s_user_course` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE s_user_course set guid=UUID();ALTER TABLE `s_user_course` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `s_user_role` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE s_user_role set guid=UUID();ALTER TABLE `s_user_role` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `tk_batch` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE tk_batch set guid=UUID();ALTER TABLE `tk_batch` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `tk_flow_log` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE tk_flow_log set guid=UUID();ALTER TABLE `tk_flow_log` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `tk_learn_center` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE tk_learn_center set guid=UUID();ALTER TABLE `tk_learn_center` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `tk_paper_difficulty_estimate` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE tk_paper_difficulty_estimate set guid=UUID();ALTER TABLE `tk_paper_difficulty_estimate` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `tk_paper_task` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE tk_paper_task set guid=UUID();ALTER TABLE `tk_paper_task` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `tk_teacher_assessment` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE tk_teacher_assessment set guid=UUID();ALTER TABLE `tk_teacher_assessment` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `tk_teacher_assessment_detail` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE tk_teacher_assessment_detail set guid=UUID();ALTER TABLE `tk_teacher_assessment_detail` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `tk_word_history` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE tk_word_history set guid=UUID();ALTER TABLE `tk_word_history` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `zk_import_question_history` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE zk_import_question_history set guid=UUID();ALTER TABLE `zk_import_question_history` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `zk_question` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE zk_question set guid=UUID();ALTER TABLE `zk_question` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `zk_question_attachment` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE zk_question_attachment set guid=UUID();ALTER TABLE `zk_question_attachment` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `zk_question_operation_log` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE zk_question_operation_log set guid=UUID();ALTER TABLE `zk_question_operation_log` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `zk_question_option` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE zk_question_option set guid=UUID();ALTER TABLE `zk_question_option` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `zk_question_option_version` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE zk_question_option_version set guid=UUID();ALTER TABLE `zk_question_option_version` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `zk_question_version` ADD COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci UNIQUE;UPDATE zk_question_version set guid=UUID();ALTER TABLE `zk_question_version` MODIFY COLUMN `guid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
