update sql backup

Signed-off-by: Chenx221 <chenx221@yandex.com>
This commit is contained in:
Chenx221 2023-06-16 13:52:35 +08:00
parent caa63444eb
commit f4f86db07a

View File

@ -11,29 +11,12 @@
Target Server Version : 80033 (8.0.33) Target Server Version : 80033 (8.0.33)
File Encoding : 65001 File Encoding : 65001
Date: 14/06/2023 15:12:44 Date: 16/06/2023 13:52:21
*/ */
SET NAMES utf8mb4; SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0; SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for admin
-- ----------------------------
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
`admin_id` int NOT NULL AUTO_INCREMENT COMMENT '管理员id',
`user_id` int NOT NULL COMMENT '用户id',
`disabled` int NOT NULL DEFAULT 0 COMMENT '禁用属性(默认 0 false)',
PRIMARY KEY (`admin_id`, `user_id`) USING BTREE,
INDEX `fk_admin_user`(`user_id` ASC) USING BTREE,
CONSTRAINT `fk_admin_user` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of admin
-- ----------------------------
-- ---------------------------- -- ----------------------------
-- Table structure for course -- Table structure for course
-- ---------------------------- -- ----------------------------
@ -44,7 +27,7 @@ CREATE TABLE `course` (
`Description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '课程描述', `Description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '课程描述',
`removed` int NULL DEFAULT 0 COMMENT '移除的课程(default: 0 false)', `removed` int NULL DEFAULT 0 COMMENT '移除的课程(default: 0 false)',
PRIMARY KEY (`CourseID`) USING BTREE PRIMARY KEY (`CourseID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; ) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;
-- ---------------------------- -- ----------------------------
-- Records of course -- Records of course
@ -61,6 +44,7 @@ INSERT INTO `course` VALUES (9, '政治', '政府与公民', 0);
INSERT INTO `course` VALUES (10, '经济', '资源与市场', 0); INSERT INTO `course` VALUES (10, '经济', '资源与市场', 0);
INSERT INTO `course` VALUES (11, '技术', '没有描述', 0); INSERT INTO `course` VALUES (11, '技术', '没有描述', 0);
INSERT INTO `course` VALUES (12, '技术2', '描述2', 0); INSERT INTO `course` VALUES (12, '技术2', '描述2', 0);
INSERT INTO `course` VALUES (13, '课程2', '描述3', 0);
-- ---------------------------- -- ----------------------------
-- Table structure for score -- Table structure for score
@ -1228,6 +1212,47 @@ INSERT INTO `student` VALUES (1001, '测试数据1', '男', '2023-08-05', '40867
INSERT INTO `student` VALUES (1002, '测试2', '', '2023-09-05', '123', '1班', 0, NULL, 0); INSERT INTO `student` VALUES (1002, '测试2', '', '2023-09-05', '123', '1班', 0, NULL, 0);
INSERT INTO `student` VALUES (1003, '', '', '2023-06-09', '221', '5班', 0, NULL, 0); INSERT INTO `student` VALUES (1003, '', '', '2023-06-09', '221', '5班', 0, NULL, 0);
-- ----------------------------
-- Table structure for teacher
-- ----------------------------
DROP TABLE IF EXISTS `teacher`;
CREATE TABLE `teacher` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '编号',
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '教师姓名',
`sex` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '性别',
`birthday` date NULL DEFAULT NULL COMMENT '出生日期',
`course_id` int NULL DEFAULT NULL COMMENT '所教课程',
`classes` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '班级',
`removed` int NULL DEFAULT 0 COMMENT '移除字段(default:0 false)',
PRIMARY KEY (`id`) USING BTREE,
INDEX `fk_teacher_course`(`course_id` ASC) USING BTREE,
CONSTRAINT `fk_teacher_course` FOREIGN KEY (`course_id`) REFERENCES `course` (`CourseID`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 21 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of teacher
-- ----------------------------
INSERT INTO `teacher` VALUES (1, '韦秀英', '', '1989-01-01', 8, '1班', 0);
INSERT INTO `teacher` VALUES (2, '蔡岚', '', '1997-08-14', 1, '5班', 0);
INSERT INTO `teacher` VALUES (3, '蒋岚', '', '1998-09-28', 9, '3班', 0);
INSERT INTO `teacher` VALUES (4, '侯嘉伦', '', '1980-05-07', 13, '3班', 0);
INSERT INTO `teacher` VALUES (5, '毛子异', '', '1995-05-03', 12, '1班', 0);
INSERT INTO `teacher` VALUES (6, '林子异', '', '1985-02-25', 7, '2班', 0);
INSERT INTO `teacher` VALUES (7, '汤杰宏', '', '1995-03-13', 6, '3班', 0);
INSERT INTO `teacher` VALUES (8, '邵安琪', '', '1987-06-10', 11, '5班', 0);
INSERT INTO `teacher` VALUES (9, '毛云熙', '', '1995-06-18', 3, '1班', 0);
INSERT INTO `teacher` VALUES (10, '曹安琪', '', '1980-11-13', 4, '1班', 0);
INSERT INTO `teacher` VALUES (11, '胡安琪', '', '1988-05-23', 10, '1班', 0);
INSERT INTO `teacher` VALUES (12, '熊詩涵', '', '1981-09-10', 5, '4班', 0);
INSERT INTO `teacher` VALUES (13, '贺詩涵', '', '1998-11-06', 2, '2班', 0);
INSERT INTO `teacher` VALUES (14, '郑安琪', '', '1995-05-31', 10, '2班', 0);
INSERT INTO `teacher` VALUES (15, '田云熙', '', '1990-06-07', 9, '4班', 0);
INSERT INTO `teacher` VALUES (16, '常震南', '', '1993-08-19', 3, '2班', 0);
INSERT INTO `teacher` VALUES (17, '刘秀英', '', '1999-02-18', 9, '2班', 0);
INSERT INTO `teacher` VALUES (18, '孟宇宁', '', '1984-12-24', 10, '1班', 0);
INSERT INTO `teacher` VALUES (19, '吕睿', '', '1989-02-22', 1, '1班', 0);
INSERT INTO `teacher` VALUES (20, '段嘉伦', '', '1995-02-08', 10, '1班', 0);
-- ---------------------------- -- ----------------------------
-- Table structure for user -- Table structure for user
-- ---------------------------- -- ----------------------------
@ -1236,19 +1261,22 @@ CREATE TABLE `user` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '用户ID', `id` int NOT NULL AUTO_INCREMENT COMMENT '用户ID',
`username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '用户名', `username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '用户名',
`password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '密码', `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '密码',
`roles` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'admin' COMMENT '角色(default: admin)', `roles` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'admin' COMMENT '角色(admin,student,teacher)',
`disabled` int NULL DEFAULT 0 COMMENT '禁用(default: 0 false)', `disabled` int NULL DEFAULT 0 COMMENT '禁用(default: 0 false)',
`detail` int NULL DEFAULT NULL COMMENT 'link to roles id',
PRIMARY KEY (`id`) USING BTREE PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; ) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;
-- ---------------------------- -- ----------------------------
-- Records of user -- Records of user
-- ---------------------------- -- ----------------------------
INSERT INTO `user` VALUES (1, 'admin', '8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918', 'admin', 0); INSERT INTO `user` VALUES (1, 'admin', '8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918', 'admin', 0, NULL);
INSERT INTO `user` VALUES (2, 'guest', '84983c60f7daadc1cb8698621f802c0d9f9a3c3c295c810748fb048115c186ec', 'admin', 1); INSERT INTO `user` VALUES (2, 'guest', '84983c60f7daadc1cb8698621f802c0d9f9a3c3c295c810748fb048115c186ec', 'admin', 1, NULL);
INSERT INTO `user` VALUES (3, 'chenx221', '62982ab94542113a449fc9528779583bb6b93988ac4678c3fd6c010b66e7a851', 'admin', 0); INSERT INTO `user` VALUES (3, 'chenx221', '62982ab94542113a449fc9528779583bb6b93988ac4678c3fd6c010b66e7a851', 'admin', 1, NULL);
INSERT INTO `user` VALUES (4, 'chenx2210', '2bd27a9cb9135ff37aee523b7e439873a46da4d5b482145927b991a95baf43bb', 'admin', 0); INSERT INTO `user` VALUES (4, 'chenx2210', '2bd27a9cb9135ff37aee523b7e439873a46da4d5b482145927b991a95baf43bb', 'admin', 0, NULL);
INSERT INTO `user` VALUES (5, 'newuser1', '7dcf407fa84a0e0519c7991154c4148de0244d7589020c0d9842db9efad82094', 'admin', 0); INSERT INTO `user` VALUES (5, 'newuser1', '7dcf407fa84a0e0519c7991154c4148de0244d7589020c0d9842db9efad82094', 'admin', 0, NULL);
INSERT INTO `user` VALUES (6, 'guest2', '6b93ccba414ac1d0ae1e77f3fac560c748a6701ed6946735a49d463351518e16', 'admin', 0); INSERT INTO `user` VALUES (6, 'guest2', '6b93ccba414ac1d0ae1e77f3fac560c748a6701ed6946735a49d463351518e16', 'admin', 0, NULL);
INSERT INTO `user` VALUES (7, 'student1', '49fe07d0f041bced9ba827a10c2cd31b2089229d4b4e3a63b074ed7a4370e88f', 'student', 0, 0);
INSERT INTO `user` VALUES (8, 'student2', '2d850eb5460ffb6bb9ae11186a2d78cc22d9df387f9cdbd3a297e0d1ea08a54b', 'student', 0, 4);
SET FOREIGN_KEY_CHECKS = 1; SET FOREIGN_KEY_CHECKS = 1;