-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathblog.sql
More file actions
122 lines (109 loc) · 3.54 KB
/
Copy pathblog.sql
File metadata and controls
122 lines (109 loc) · 3.54 KB
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
/*
Navicat MySQL Data Transfer
Source Server : database
Source Server Version : 50505
Source Host : localhost:3306
Source Database : blog
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2017-12-18 17:06:44
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for article
-- ----------------------------
DROP TABLE IF EXISTS `article`;
CREATE TABLE `article` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(100) DEFAULT NULL,
`body` longtext,
`tag` varchar(50) DEFAULT NULL COMMENT '每条记录的标签',
`category` varchar(40) DEFAULT NULL,
`created_at` date DEFAULT NULL,
`updated_at` date DEFAULT NULL,
`status` tinyint(1) DEFAULT '1' COMMENT '1表示正常 0表示删除 ',
`type` tinyint(3) DEFAULT '1' COMMENT '1:原创; 0:转载',
`views` int(11) DEFAULT '0',
`markdown` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=101 DEFAULT CHARSET=utf8mb4;
-- ----------------------------
-- Table structure for category
-- ----------------------------
DROP TABLE IF EXISTS `category`;
CREATE TABLE `category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`theme` varchar(30) DEFAULT NULL,
`status` tinyint(1) DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4;
-- ----------------------------
-- Table structure for config
-- ----------------------------
DROP TABLE IF EXISTS `config`;
CREATE TABLE `config` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(30) DEFAULT NULL,
`value` text,
`status` tinyint(1) DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4;
-- ----------------------------
-- Table structure for gather
-- ----------------------------
DROP TABLE IF EXISTS `gather`;
CREATE TABLE `gather` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(100) DEFAULT NULL,
`detail` text,
`tag` varchar(30) DEFAULT NULL,
`created_at` date DEFAULT NULL,
`updated_at` date DEFAULT NULL,
`status` tinyint(2) DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8mb4;
-- ----------------------------
-- Table structure for gossip
-- ----------------------------
DROP TABLE IF EXISTS `gossip`;
CREATE TABLE `gossip` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`detail` text,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`picid` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4;
-- ----------------------------
-- Table structure for link
-- ----------------------------
DROP TABLE IF EXISTS `link`;
CREATE TABLE `link` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`text` varchar(50) DEFAULT NULL,
`url` text,
`status` tinyint(1) DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`userid` varchar(30) NOT NULL,
`username` varchar(30) DEFAULT NULL,
`password` varchar(64) DEFAULT NULL,
`status` tinyint(1) DEFAULT '1',
PRIMARY KEY (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- ----------------------------
-- Table structure for pictrue
-- ----------------------------
DROP TABLE IF EXISTS `pictrue`;
CREATE TABLE `pictrue` (
`picid` int(11) NOT NULL AUTO_INCREMENT,
`base64` MEDIUMTEXT DEFAULT NULL,
`file_name` varchar(100) DEFAULT NULL,
PRIMARY KEY (`picid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;