ALTER TABLE `is_training`
ADD COLUMN `is_using` int(2) DEFAULT 1 COMMENT '启用状态：0-下架，1-上架',
modify column `view_count` int(6) DEFAULT '0' COMMENT '学习人数',
ADD column `like_count` int(6) DEFAULT '0' COMMENT '点赞人数' AFTER `view_count`;

ALTER TABLE `is_training_material`
ADD column `view_count` int(6) DEFAULT '0' COMMENT '学习人数',
ADD column `score` decimal(10,1) DEFAULT '0' COMMENT '综合评分',
ADD column `like_count` int(6) DEFAULT '0' COMMENT '点赞人数' AFTER `view_count`;

ALTER TABLE `is_training_resource`
ADD column `view_count` int(6) DEFAULT '0' COMMENT '学习人数',
ADD column `score` decimal(10,1) DEFAULT '0' COMMENT '综合评分',
ADD column `like_count` int(6) DEFAULT '0' COMMENT '点赞人数' AFTER `view_count`;

ALTER TABLE `is_training_comment`
modify column `comment_type` int(2) DEFAULT '1' COMMENT '评论类型：1-课程，2-培训,3-商学院,4-素材',
ADD COLUMN `is_del` int(2) DEFAULT '0' COMMENT '是否删除：0-否，1-是';

UPDATE is_training set is_using=0 where `status`=0;

UPDATE is_training
set is_show=0 where `status`=1;

UPDATE is_training
set is_show=1 where `status`=2;

update is_training
set is_show=1 where is_show is null;