Skip to content

Commit ff9c125

Browse files
committed
修改SQL文件
1 parent 784aa2a commit ff9c125

File tree

4 files changed

+54
-59
lines changed

4 files changed

+54
-59
lines changed

springboot-08-jdbc/src/main/resources/application.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@ spring:
55
username: root
66
password: '123456'
77
schema:
8-
- classpath:sql/department.sql
9-
- classpath:sql/employee.sql
10-
initialization-mode: never
8+
- classpath:sql/springboot-jdbc.sql
9+
initialization-mode: always

springboot-08-jdbc/src/main/resources/sql/department.sql

Lines changed: 0 additions & 27 deletions
This file was deleted.

springboot-08-jdbc/src/main/resources/sql/employee.sql

Lines changed: 0 additions & 29 deletions
This file was deleted.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*
2+
Navicat MySQL Data Transfer
3+
4+
Source Server : 127.0.0.1
5+
Source Server Version : 80013
6+
Source Host : localhost:3306
7+
Source Database : springboot-jdbc
8+
9+
Target Server Type : MYSQL
10+
Target Server Version : 80013
11+
File Encoding : 65001
12+
13+
Date: 2019-01-21 15:49:23
14+
*/
15+
16+
SET FOREIGN_KEY_CHECKS=0;
17+
18+
-- ----------------------------
19+
-- Table structure for department
20+
-- ----------------------------
21+
DROP TABLE IF EXISTS `department`;
22+
CREATE TABLE `department` (
23+
`id` int(11) NOT NULL AUTO_INCREMENT,
24+
`departmentName` varchar(255) DEFAULT NULL,
25+
PRIMARY KEY (`id`)
26+
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
27+
28+
-- ----------------------------
29+
-- Records of department
30+
-- ----------------------------
31+
INSERT INTO `department` VALUES ('1', 'D-AA');
32+
INSERT INTO `department` VALUES ('2', 'D-BB');
33+
INSERT INTO `department` VALUES ('3', 'D-CC');
34+
INSERT INTO `department` VALUES ('4', 'D-DD');
35+
INSERT INTO `department` VALUES ('5', 'D-EE');
36+
37+
-- ----------------------------
38+
-- Table structure for employee
39+
-- ----------------------------
40+
DROP TABLE IF EXISTS `employee`;
41+
CREATE TABLE `employee` (
42+
`id` int(11) NOT NULL AUTO_INCREMENT,
43+
`lastName` varchar(255) DEFAULT NULL,
44+
`email` varchar(255) DEFAULT NULL,
45+
`gender` int(2) DEFAULT NULL,
46+
`d_id` int(11) DEFAULT NULL,
47+
PRIMARY KEY (`id`)
48+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
49+
50+
-- ----------------------------
51+
-- Records of employee
52+
-- ----------------------------

0 commit comments

Comments
 (0)