This repository has been archived by the owner on Aug 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
base.sql
56 lines (49 loc) · 1.87 KB
/
base.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
DROP TABLE IF EXISTS `channels`;
CREATE TABLE `channels` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`serverid` int(11) NOT NULL,
`name` text NOT NULL,
`description` text NOT NULL,
`config` text DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
DROP TABLE IF EXISTS `messages`;
CREATE TABLE `messages` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`content` text NOT NULL,
`date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`authorid` int(11) NOT NULL,
`channelid` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=316 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
DROP TABLE IF EXISTS `perms`;
CREATE TABLE `perms` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userid` int(11) NOT NULL,
`serverid` int(11) NOT NULL,
`perms` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`perms`)),
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
DROP TABLE IF EXISTS `servers`;
CREATE TABLE `servers` (
`serverid` int(11) NOT NULL AUTO_INCREMENT,
`name` text NOT NULL,
`description` text NOT NULL,
`members` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
`bans` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
`link` text DEFAULT NULL,
PRIMARY KEY (`serverid`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`tag` text NOT NULL,
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` text NOT NULL,
`bio` text DEFAULT NULL,
`password` text NOT NULL,
`token` text NOT NULL,
`mail` text NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id_2` (`id`),
KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;