-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathlight-blog.sql
142 lines (126 loc) · 5.29 KB
/
light-blog.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
/*
Navicat MySQL Data Transfer
Source Server : 本地数据库
Source Server Version : 50714
Source Host : localhost:3306
Source Database : light-blog
Target Server Type : MYSQL
Target Server Version : 50714
File Encoding : 65001
Date: 2020-02-29 14:41:41
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `t_blog`
-- ----------------------------
DROP TABLE IF EXISTS `t_blog`;
CREATE TABLE `t_blog` (
`id` bigint(10) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(50) DEFAULT NULL,
`content` varchar(10000) DEFAULT NULL,
`first_picture` varchar(500) DEFAULT NULL,
`flag` varchar(50) DEFAULT NULL,
`views` int(10) DEFAULT NULL,
`appreciation` tinyint(2) DEFAULT NULL,
`share_statement` tinyint(2) DEFAULT NULL,
`commentabled` tinyint(2) DEFAULT NULL,
`published` tinyint(2) DEFAULT NULL,
`recommend` tinyint(2) DEFAULT NULL,
`create_time` date DEFAULT NULL,
`update_time` date DEFAULT NULL,
`type_id` bigint(20) DEFAULT NULL,
`user_id` bigint(20) DEFAULT NULL,
`description` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FK292449gwg5yf7ocdlmswv9w4j` (`type_id`),
KEY `FK8ky5rrsxh01nkhctmo7d48p82` (`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of t_blog
-- ----------------------------
INSERT INTO `t_blog` VALUES ('1', '第一篇博文', '#第一篇博文\r\n没有什么好讲的...\r\n##Java\r\nJava是一门面向对象编程语言,不仅吸收了C++语言的各种优点,还摒弃了C++里难以理解的多继承、指针等概念,因此Java语言具有功能强大和简单易用两个特征。Java语言作为静态面向对象编程语言的代表,极好地实现了面向对象理论,允许程序员以优雅的思维方式进行复杂的编程', 'https://imgconvert.csdnimg.cn/aHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL2l0aHVhbmdxaW5nL215aW1nL21hc3Rlci9pbWcvMjAxOTExMTIwMDIxMDcucG5n?x-oss-process=image/format,png', '', '8', '1', '1', '1', '1', '1', '2020-02-29', '2020-02-29', '1', '10000', '第一篇博文');
-- ----------------------------
-- Table structure for `t_blog_tags`
-- ----------------------------
DROP TABLE IF EXISTS `t_blog_tags`;
CREATE TABLE `t_blog_tags` (
`blogs_id` bigint(20) NOT NULL,
`tags_id` bigint(20) NOT NULL,
KEY `FK5feau0gb4lq47fdb03uboswm8` (`tags_id`),
KEY `FKh4pacwjwofrugxa9hpwaxg6mr` (`blogs_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of t_blog_tags
-- ----------------------------
INSERT INTO `t_blog_tags` VALUES ('1', '1');
INSERT INTO `t_blog_tags` VALUES ('1', '2');
-- ----------------------------
-- Table structure for `t_comment`
-- ----------------------------
DROP TABLE IF EXISTS `t_comment`;
CREATE TABLE `t_comment` (
`id` bigint(10) unsigned NOT NULL AUTO_INCREMENT,
`nickname` varchar(50) DEFAULT NULL,
`email` varchar(50) DEFAULT NULL,
`content` varchar(1000) DEFAULT NULL,
`avatar` varchar(500) DEFAULT NULL,
`create_time` date DEFAULT NULL,
`blog_id` bigint(20) DEFAULT NULL,
`parent_comment_id` bigint(20) DEFAULT NULL,
`admin_comment` bit(1) NOT NULL,
PRIMARY KEY (`id`),
KEY `FKke3uogd04j4jx316m1p51e05u` (`blog_id`),
KEY `FK4jj284r3pb7japogvo6h72q95` (`parent_comment_id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of t_comment
-- ----------------------------
INSERT INTO `t_comment` VALUES ('1', '管理员', '[email protected]', '试试', null, '2020-02-29', '1', null, '');
-- ----------------------------
-- Table structure for `t_tag`
-- ----------------------------
DROP TABLE IF EXISTS `t_tag`;
CREATE TABLE `t_tag` (
`id` bigint(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of t_tag
-- ----------------------------
INSERT INTO `t_tag` VALUES ('1', 'Java');
INSERT INTO `t_tag` VALUES ('2', 'Spring Boot');
-- ----------------------------
-- Table structure for `t_type`
-- ----------------------------
DROP TABLE IF EXISTS `t_type`;
CREATE TABLE `t_type` (
`id` bigint(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of t_type
-- ----------------------------
INSERT INTO `t_type` VALUES ('1', '技术');
INSERT INTO `t_type` VALUES ('2', '生活');
-- ----------------------------
-- Table structure for `t_user`
-- ----------------------------
DROP TABLE IF EXISTS `t_user`;
CREATE TABLE `t_user` (
`id` bigint(10) unsigned NOT NULL AUTO_INCREMENT,
`nickname` varchar(50) DEFAULT NULL,
`username` varchar(50) DEFAULT NULL,
`password` varchar(50) DEFAULT NULL,
`email` varchar(50) DEFAULT NULL,
`avatar` varchar(50) DEFAULT NULL,
`type` int(10) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of t_user
-- ----------------------------
INSERT INTO `t_user` VALUES ('10000', '管理员', 'admin', '21232f297a57a5a743894a0e4a801fc3', '[email protected]', '/images/avatar.png', '1', '2020-02-29 12:23:30', '2020-02-29 12:23:34');