mysql脚本.sql 6.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. -- 修改权限组表
  2. ALTER TABLE EC_B_PRIVILEGE_GROUP DROP INDEX UK_fsdvgdf02vmgi4nuq3k7hxbgy;
  3. ALTER TABLE EC_B_PRIVILEGE_GROUP DROP INDEX UK_gtfc2sf4qnyb50v8wavhutcdy;
  4. ALTER TABLE EC_B_PRIVILEGE_GROUP ADD type VARCHAR(50) NOT NULL;
  5. ALTER TABLE EC_B_PRIVILEGE_GROUP ADD root_org_id BIGINT NULL;
  6. ALTER TABLE EC_B_PRIVILEGE_GROUP ADD CONSTRAINT IDX_B_PRI_G_002001 UNIQUE (`code`);
  7. ALTER TABLE EC_B_PRIVILEGE_GROUP ADD CONSTRAINT IDX_B_PRI_G_002002 UNIQUE (root_org_id,type);
  8. -- 权限组表更新数据
  9. UPDATE ec_b_privilege_group set type='ADMIN_MENU' where id in (0,1,2,3,4,5,7) and 1=2;
  10. UPDATE ec_b_privilege_group set type='FUNCTION' where id in (8);
  11. UPDATE ec_b_privilege_group set type='DATA_ACCESS' where id in (9);
  12. -- 权限组表新增数据
  13. INSERT INTO `ec_b_privilege_group`(`id`, `creation_time`, `update_time`, `code`, `name`, `type`, `root_org_id`, `ext1`, `ext2`, `ext3`, `ext4`, `ext5`) VALUES (10, '2020-03-26 15:02:16', '2020-03-26 15:02:16', 'STUDENT_CLIENT_MENU', '考生端菜单', 'STUDENT_CLIENT_MENU', NULL, 'menu', NULL, NULL, NULL, NULL);
  14. -- 权限表新增数据
  15. INSERT INTO `ec_b_privilege`(`id`, `creation_time`, `update_time`, `code`, `description`, `ext1`, `ext2`, `ext3`, `ext4`, `ext5`, `group_id`, `name`, `parent_id`, `weight`) VALUES (6542, '2020-03-26 15:24:04', '2020-03-26 15:43:33', 'stu_online_exam', '在线考试', 'ONLINE', NULL, NULL, NULL, NULL, 10, '在线考试', NULL, 6);
  16. INSERT INTO `ec_b_privilege`(`id`, `creation_time`, `update_time`, `code`, `description`, `ext1`, `ext2`, `ext3`, `ext4`, `ext5`, `group_id`, `name`, `parent_id`, `weight`) VALUES (6543, '2020-03-26 15:25:05', '2020-03-26 15:29:24', 'stu_online_homework', '在线作业', NULL, NULL, NULL, NULL, NULL, 10, '在线作业', NULL, 5);
  17. INSERT INTO `ec_b_privilege`(`id`, `creation_time`, `update_time`, `code`, `description`, `ext1`, `ext2`, `ext3`, `ext4`, `ext5`, `group_id`, `name`, `parent_id`, `weight`) VALUES (6544, '2020-03-26 15:26:10', '2020-03-26 15:29:29', 'stu_online_practice', '在线练习', NULL, NULL, NULL, NULL, NULL, 10, '在线练习', NULL, 4);
  18. INSERT INTO `ec_b_privilege`(`id`, `creation_time`, `update_time`, `code`, `description`, `ext1`, `ext2`, `ext3`, `ext4`, `ext5`, `group_id`, `name`, `parent_id`, `weight`) VALUES (6545, '2020-03-26 15:26:39', '2020-03-26 15:29:53', 'stu_offline_exam', '离线考试', NULL, NULL, NULL, NULL, NULL, 10, '离线考试', NULL, 3);
  19. INSERT INTO `ec_b_privilege`(`id`, `creation_time`, `update_time`, `code`, `description`, `ext1`, `ext2`, `ext3`, `ext4`, `ext5`, `group_id`, `name`, `parent_id`, `weight`) VALUES (6546, '2020-03-26 15:27:05', '2020-03-26 15:30:00', 'stu_notice', '公告通知', NULL, NULL, NULL, NULL, NULL, 10, '公告通知', NULL, 2);
  20. INSERT INTO `ec_b_privilege`(`id`, `creation_time`, `update_time`, `code`, `description`, `ext1`, `ext2`, `ext3`, `ext4`, `ext5`, `group_id`, `name`, `parent_id`, `weight`) VALUES (6547, '2020-03-26 15:28:55', '2020-03-26 15:30:05', 'stu_modify_pwd', '修改密码', NULL, NULL, NULL, NULL, NULL, 10, '修改密码', NULL, 1);
  21. -- 添加违纪类型表
  22. CREATE TABLE `ec_oe_illegally_type` (
  23. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  24. `creation_time` datetime(0) NOT NULL,
  25. `update_time` datetime(0) NOT NULL,
  26. `code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  27. `data_category` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  28. `enable` bit(1) NOT NULL,
  29. `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  30. `root_org_id` bigint(20) NOT NULL,
  31. `sort_no` int(11) NOT NULL,
  32. PRIMARY KEY (`id`) USING BTREE,
  33. UNIQUE INDEX `IDX_E_O_I_T_001`(`root_org_id`, `code`) USING BTREE
  34. ) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
  35. -- 初始化违纪类型表
  36. INSERT INTO `ec_oe_illegally_type`(`id`, `creation_time`, `update_time`, `code`, `data_category`, `enable`, `name`, `root_org_id`, `sort_no`) VALUES (1, '2020-03-17 11:48:49', '2020-03-17 11:48:49', 'POWER_FAILURE', 'SYSTEM', b'1', '断电', -1, 7);
  37. INSERT INTO `ec_oe_illegally_type`(`id`, `creation_time`, `update_time`, `code`, `data_category`, `enable`, `name`, `root_org_id`, `sort_no`) VALUES (2, '2020-03-17 11:48:49', '2020-03-17 11:48:49', 'MACHINE_STOPPAGE', 'SYSTEM', b'1', '机器故障', -1, 9);
  38. INSERT INTO `ec_oe_illegally_type`(`id`, `creation_time`, `update_time`, `code`, `data_category`, `enable`, `name`, `root_org_id`, `sort_no`) VALUES (5, '2020-03-17 11:48:49', '2020-03-17 11:48:49', 'OTHER', 'SYSTEM', b'1', '其他', -1, 10);
  39. INSERT INTO `ec_oe_illegally_type`(`id`, `creation_time`, `update_time`, `code`, `data_category`, `enable`, `name`, `root_org_id`, `sort_no`) VALUES (6, '2020-03-17 11:48:49', '2020-03-17 11:48:49', 'CHEAT', 'SYSTEM', b'1', '作弊', -1, 1);
  40. INSERT INTO `ec_oe_illegally_type`(`id`, `creation_time`, `update_time`, `code`, `data_category`, `enable`, `name`, `root_org_id`, `sort_no`) VALUES (7, '2020-03-17 11:48:49', '2020-03-17 11:48:49', 'NOT_ONESELF', 'SYSTEM', b'1', '他人替考', -1, 2);
  41. INSERT INTO `ec_oe_illegally_type`(`id`, `creation_time`, `update_time`, `code`, `data_category`, `enable`, `name`, `root_org_id`, `sort_no`) VALUES (8, '2020-03-17 11:48:49', '2020-03-17 11:48:49', 'ACTION_FAILURE', 'SYSTEM', b'1', '指定动作失败', -1, 4);
  42. INSERT INTO `ec_oe_illegally_type`(`id`, `creation_time`, `update_time`, `code`, `data_category`, `enable`, `name`, `root_org_id`, `sort_no`) VALUES (9, '2020-03-17 11:48:49', '2020-03-17 11:48:49', 'WITHOUT_ACTION', 'SYSTEM', b'1', '未进行人脸指定动作检测', -1, 8);
  43. INSERT INTO `ec_oe_illegally_type`(`id`, `creation_time`, `update_time`, `code`, `data_category`, `enable`, `name`, `root_org_id`, `sort_no`) VALUES (10, '2020-03-17 11:48:49', '2020-03-17 11:48:49', 'BATCH_PASS', 'SYSTEM', b'1', '批量审核通过', -1, 6);
  44. INSERT INTO `ec_oe_illegally_type`(`id`, `creation_time`, `update_time`, `code`, `data_category`, `enable`, `name`, `root_org_id`, `sort_no`) VALUES (11, '2020-03-17 11:48:49', '2020-03-17 11:48:49', 'BATCH_NOTPASS', 'SYSTEM', b'1', '批量审核不通过', -1, 5);
  45. INSERT INTO `ec_oe_illegally_type`(`id`, `creation_time`, `update_time`, `code`, `data_category`, `enable`, `name`, `root_org_id`, `sort_no`) VALUES (12, '2020-03-17 11:48:49', '2020-03-17 11:48:49', 'NOT_ONESELF_OF_PHOTO', 'SYSTEM', b'1', '相片替考', -1, 3);
  46. -- 考生表新加字段
  47. ALTER TABLE ec_oe_exam_student ADD reexamine_type VARCHAR(50) NULL;
  48. ALTER TABLE ec_oe_exam_student ADD reexamine_detail VARCHAR(200) NULL;
  49. -- 考试记录表新加字段
  50. ALTER TABLE ec_oe_exam_record_data ADD reexamine_type VARCHAR(50) NULL;
  51. ALTER TABLE ec_oe_exam_record_data ADD reexamine_detail VARCHAR(200) NULL;
  52. -- 审核表新加违纪类型字段
  53. ALTER TABLE ec_oe_exam_audit ADD illegally_type_id BIGINT NULL;