ALTER TABLE cloud_system.account ADD talent_id varchar(100) NULL COMMENT '准增员唯一标识';
ALTER TABLE cloud_system.account ADD outer_flag tinyint(1) DEFAULT 0 NULL COMMENT '1:上编 2:复效';
ALTER TABLE cloud_course.course ADD sort int DEFAULT 0 NULL COMMENT '排序';
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE IF EXISTS `data_record`;
CREATE TABLE `data_record` (
`id` bigint(20) NOT NULL COMMENT '主键',
`start_time` datetime DEFAULT NULL COMMENT '本次执行的MODIFY_DATE字段',
`end_time` datetime NOT NULL COMMENT '下次执行的MODIFY_DATE字段',
`count` bigint(20) DEFAULT NULL COMMENT '更新行数',
`total_count` bigint(20) DEFAULT NULL COMMENT '需执行的总数',
`type` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '类型',
`deleted` tinyint(1) DEFAULT '0' COMMENT '删除 0否 1 是 默认0',
`create_by_id` bigint(20) DEFAULT NULL COMMENT '创建人id',
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_by_id` bigint(20) DEFAULT NULL COMMENT '更新人id',
`update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`company_id` bigint(20) DEFAULT NULL COMMENT '企业id',
`site_id` bigint(20) DEFAULT NULL COMMENT '站点id',
`org_id` bigint(20) DEFAULT NULL COMMENT '组织ID',
`page_no` int(3) NOT NULL,
`page_size` int(5) NOT NULL DEFAULT '0',
`success` tinyint(1) NOT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
SET FOREIGN_KEY_CHECKS = 1;
ALTER TABLE `cloud_system`.`account`
ADD COLUMN `allianz_user_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '安联用户id' AFTER `outer_flag`,
ADD COLUMN `allianz_parent_user_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '安联上一级用户id' AFTER `allianz_user_id`,
DROP PRIMARY KEY,
ADD PRIMARY KEY (`id`) USING BTREE;
ALTER TABLE `cloud_system`.`account`
ADD COLUMN `user_int_id` bigint NULL DEFAULT NULL COMMENT '安联userIntId\n' AFTER `allianz_parent_user_id`,
DROP PRIMARY KEY,
ADD PRIMARY KEY (`id`) USING BTREE;
ALTER TABLE `cloud_system`.`account`
ADD COLUMN `role_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '安联roleType' AFTER `user_int_id`,
DROP PRIMARY KEY,
ADD PRIMARY KEY (`id`) USING BTREE;
ALTER TABLE `cloud_course`.`course_schedule`
ADD COLUMN `course_schedule_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '课表编码' AFTER `course_schedule_name`,
DROP PRIMARY KEY,
ADD PRIMARY KEY (`id`) USING BTREE;
ALTER TABLE `cloud_system`.`account`
ADD COLUMN `handle_flag` tinyint(1) NULL DEFAULT 0 COMMENT '0:处理完成 1:正在处理' AFTER `role_type`,
DROP PRIMARY KEY,
ADD PRIMARY KEY (`id`) USING BTREE;