-- 添加班级类型字段
DROP PROCEDURE IF EXISTS createCom;
DELIMITER $$
CREATE
    PROCEDURE createCom()
BEGIN
    IF NOT EXISTS(SELECT 1 FROM information_schema.columns  WHERE table_name='base_class' AND COLUMN_NAME = 'class_type') THEN
ALTER TABLE `base_class`   
  ADD COLUMN `class_type` VARCHAR(50) NULL   COMMENT '班级类型(xjr_dictionary_item[class_type])' AFTER `is_graduate`;
    END IF;
END$$
DELIMITER ;
CALL createCom;
DROP PROCEDURE createCom;

DROP PROCEDURE IF EXISTS createCom;
DELIMITER $$
CREATE
    PROCEDURE createCom()
BEGIN
    IF NOT EXISTS(SELECT 1 FROM information_schema.columns  WHERE table_name='wf_course_adjust' AND COLUMN_NAME = 'class_id') THEN
ALTER TABLE `wf_course_adjust`   
  ADD COLUMN `class_id` BIGINT NULL   COMMENT '班级id';
    END IF;
END$$
DELIMITER ;
CALL createCom;
DROP PROCEDURE createCom;

