USE teachreport_db;

ALTER TABLE basic_attachment
    ADD COLUMN school_id BIGINT NULL COMMENT '学校id' AFTER id,
    ADD COLUMN org_id BIGINT NULL COMMENT '机构id' AFTER school_id,
    ADD COLUMN update_id BIGINT NULL COMMENT '更新人' AFTER create_time,
    ADD COLUMN update_time BIGINT NULL COMMENT '更新时间' AFTER update_id;


ALTER TABLE sys_user
    ADD COLUMN allow_course_scan TINYINT(1) NULL DEFAULT '1' COMMENT '是否允许识别课程条码' AFTER allow_manual_card,
    CHANGE COLUMN code code VARCHAR(100) NULL COMMENT '工号' AFTER real_name,
    CHANGE COLUMN pwd_count pwd_count TINYINT NULL DEFAULT '0' COMMENT '密码修改次数，默认为0' AFTER enable;

ALTER TABLE basic_school
    ADD COLUMN exam_task_instr VARCHAR(500) NULL COMMENT '广药命题界面提示信息' AFTER background_image;