createTables.sql
1.32 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
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- article表
-- ----------------------------
CREATE TABLE `article` (
`id` bigint(20) DEFAULT NULL,
`likeNum` bigint(20) DEFAULT NULL,
`commentsLen` bigint(20) DEFAULT NULL,
`reposts_count` bigint(20) DEFAULT NULL,
`region` text,
`content` text,
`contentLen` bigint(20) DEFAULT NULL,
`created_at` text,
`type` text,
`detailUrl` text,
`authorAvatar` text,
`authorName` text,
`authorDetail` text,
`isVip` double DEFAULT NULL,
`topic` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- ----------------------------
-- comments表
-- ----------------------------
CREATE TABLE `comments` (
`articleId` bigint(20) DEFAULT NULL,
`created_at` text,
`likes_counts` bigint(20) DEFAULT NULL,
`region` text,
`content` text,
`authorName` text,
`authorGender` text,
`authorAddress` text,
`authorAvatar` text,
`topic` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- ----------------------------
-- user表
-- ----------------------------
CREATE TABLE `user` (
`username` varchar(255) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
`id` int(11) NOT NULL AUTO_INCREMENT,
`createTime` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;