-
Notifications
You must be signed in to change notification settings - Fork 120
/
blog.sql
135 lines (123 loc) · 4.21 KB
/
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
/*
Navicat MySQL Data Transfer
Source Server : mysql
Source Server Version : 50721
Source Host : 192.168.66.188:3306
Source Database : blog
Target Server Type : MYSQL
Target Server Version : 50721
File Encoding : 65001
Date: 2018-04-25 08:39:14
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for alembic_version
-- ----------------------------
DROP TABLE IF EXISTS `alembic_version`;
CREATE TABLE `alembic_version` (
`version_num` varchar(32) NOT NULL,
PRIMARY KEY (`version_num`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for article
-- ----------------------------
DROP TABLE IF EXISTS `article`;
CREATE TABLE `article` (
`article_id` varchar(20) NOT NULL,
`article_title` varchar(100) NOT NULL,
`article_text` text,
`article_summary` varchar(255) DEFAULT NULL,
`article_read_cnt` int(11) DEFAULT NULL,
`article_sc` int(11) DEFAULT NULL,
`article_pl` int(11) DEFAULT NULL,
`article_date` datetime DEFAULT NULL,
`article_url` text,
`article_type` varchar(10) DEFAULT NULL,
`article_author` varchar(20) DEFAULT NULL,
`user_id` varchar(20) DEFAULT NULL,
PRIMARY KEY (`article_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for comment
-- ----------------------------
DROP TABLE IF EXISTS `comment`;
CREATE TABLE `comment` (
`comment_id` varchar(20) NOT NULL,
`comment_text` text,
`comment_date` datetime DEFAULT NULL,
`user_id` varchar(20) NOT NULL,
`article_id` varchar(20) NOT NULL,
PRIMARY KEY (`comment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for commparam
-- ----------------------------
DROP TABLE IF EXISTS `commparam`;
CREATE TABLE `commparam` (
`param_name` varchar(10) NOT NULL,
`param_value` int(11) DEFAULT NULL,
`param_text` varchar(100) DEFAULT NULL,
`param_stat` varchar(2) DEFAULT NULL,
PRIMARY KEY (`param_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for fiction
-- ----------------------------
DROP TABLE IF EXISTS `fiction`;
CREATE TABLE `fiction` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`fiction_name` varchar(255) DEFAULT NULL,
`fiction_id` varchar(255) DEFAULT NULL,
`fiction_real_url` varchar(255) DEFAULT NULL,
`fiction_img` varchar(255) DEFAULT NULL,
`fiction_author` char(30) DEFAULT NULL,
`fiction_comment` varchar(255) DEFAULT NULL,
`update` varchar(255) DEFAULT NULL,
`new_content` varchar(255) DEFAULT NULL,
`new_url` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for fiction_content
-- ----------------------------
DROP TABLE IF EXISTS `fiction_content`;
CREATE TABLE `fiction_content` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`fiction_url` varchar(255) DEFAULT NULL,
`fiction_content` longtext,
`fiction_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3274 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for fiction_lst
-- ----------------------------
DROP TABLE IF EXISTS `fiction_lst`;
CREATE TABLE `fiction_lst` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`fiction_name` varchar(255) DEFAULT NULL,
`fiction_id` varchar(255) DEFAULT NULL,
`fiction_lst_url` varchar(255) DEFAULT NULL,
`fiction_lst_name` varchar(255) DEFAULT NULL,
`fiction_real_url` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7646 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`user_id` varchar(20) NOT NULL,
`user_name` varchar(30) DEFAULT NULL,
`nickname` varchar(40) DEFAULT NULL,
`sex` varchar(4) DEFAULT NULL,
`age` int(11) DEFAULT NULL,
`password_hash` varchar(128) DEFAULT NULL,
`email` varchar(50) DEFAULT NULL,
`last_login_tm` datetime DEFAULT NULL,
`user_crt_dt` datetime DEFAULT NULL,
`attention_cnt` int(11) DEFAULT NULL,
PRIMARY KEY (`user_id`),
UNIQUE KEY `email` (`email`),
UNIQUE KEY `nickname` (`nickname`),
UNIQUE KEY `user_name` (`user_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;