sql backup
Signed-off-by: Chenx221 <chenx221@yandex.com>
This commit is contained in:
parent
96f0fcb2cb
commit
f023952f0b
@ -11,12 +11,31 @@
|
|||||||
Target Server Version : 80033 (8.0.33)
|
Target Server Version : 80033 (8.0.33)
|
||||||
File Encoding : 65001
|
File Encoding : 65001
|
||||||
|
|
||||||
Date: 16/06/2023 21:12:31
|
Date: 17/06/2023 10:27:53
|
||||||
*/
|
*/
|
||||||
|
|
||||||
SET NAMES utf8mb4;
|
SET NAMES utf8mb4;
|
||||||
SET FOREIGN_KEY_CHECKS = 0;
|
SET FOREIGN_KEY_CHECKS = 0;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for class
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `class`;
|
||||||
|
CREATE TABLE `class` (
|
||||||
|
`class_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '1班~5班',
|
||||||
|
`class_description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '班级描述',
|
||||||
|
PRIMARY KEY (`class_id`) USING BTREE
|
||||||
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of class
|
||||||
|
-- ----------------------------
|
||||||
|
INSERT INTO `class` VALUES ('1班', NULL);
|
||||||
|
INSERT INTO `class` VALUES ('2班', NULL);
|
||||||
|
INSERT INTO `class` VALUES ('3班', NULL);
|
||||||
|
INSERT INTO `class` VALUES ('4班', NULL);
|
||||||
|
INSERT INTO `class` VALUES ('5班', NULL);
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for course
|
-- Table structure for course
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
@ -202,7 +221,9 @@ CREATE TABLE `student` (
|
|||||||
`removed` int NULL DEFAULT 0 COMMENT '移除的记录(default: 0 false)',
|
`removed` int NULL DEFAULT 0 COMMENT '移除的记录(default: 0 false)',
|
||||||
`photo` blob NULL COMMENT '照片(可选)(暂未实现)',
|
`photo` blob NULL COMMENT '照片(可选)(暂未实现)',
|
||||||
`user_id` int NOT NULL COMMENT '对应的user表id',
|
`user_id` int NOT NULL COMMENT '对应的user表id',
|
||||||
PRIMARY KEY (`id`) USING BTREE
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
|
INDEX `fk_student_classes`(`classes` ASC) USING BTREE,
|
||||||
|
CONSTRAINT `fk_student_classes` FOREIGN KEY (`classes`) REFERENCES `class` (`class_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 1004 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;
|
) ENGINE = InnoDB AUTO_INCREMENT = 1004 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
@ -1226,7 +1247,9 @@ CREATE TABLE `teacher` (
|
|||||||
`removed` int NULL DEFAULT 0 COMMENT '移除字段(default:0 false)',
|
`removed` int NULL DEFAULT 0 COMMENT '移除字段(default:0 false)',
|
||||||
PRIMARY KEY (`id`) USING BTREE,
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
INDEX `fk_teacher_course`(`course_id` ASC) 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
|
INDEX `fk_teacher_classes`(`classes` ASC) USING BTREE,
|
||||||
|
CONSTRAINT `fk_teacher_course` FOREIGN KEY (`course_id`) REFERENCES `course` (`CourseID`) ON DELETE RESTRICT ON UPDATE RESTRICT,
|
||||||
|
CONSTRAINT `fk_teacher_classes` FOREIGN KEY (`classes`) REFERENCES `class` (`class_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 21 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;
|
) ENGINE = InnoDB AUTO_INCREMENT = 21 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
1301
project2/project2_backup.sql
Normal file
1301
project2/project2_backup.sql
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user