-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.sql
33 lines (29 loc) · 1.03 KB
/
init.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
CREATE TABLE `users` (
`rec_id` bigint(11) NOT NULL AUTO_INCREMENT,
`name` varchar(30) NOT NULL,
`password` varchar(100) NOT NULL,
`type` int(2) DEFAULT NULL,
`add_time` datetime DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
PRIMARY KEY (`rec_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
CREATE TABLE `articles` (
`rec_id` bigint(11) NOT NULL AUTO_INCREMENT,
`title` varchar(100) NOT NULL,
`content` varchar(5000) NOT NULL,
`status` int(2) DEFAULT NULL,
`add_time` datetime DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
PRIMARY KEY (`rec_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
CREATE TABLE `posts` (
`rec_id` bigint(11) NOT NULL AUTO_INCREMENT,
`art_id` bigint(11) DEFAULT NULL,
`user_id` bigint(11) DEFAULT NULL,
`content` varchar(5000) NOT NULL,
`status` int(2) DEFAULT NULL,
`ip` varchar(100) DEFAULT NULL,
`add_time` datetime DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
PRIMARY KEY (`rec_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;