This repository has been archived by the owner on Nov 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdatabaseCreation.sql
80 lines (73 loc) · 2.53 KB
/
databaseCreation.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
CREATE DATABASE IF NOT EXISTS `servant`;
USE `servant`;
DROP TABLE IF EXISTS `ActionLog`;
CREATE TABLE `ActionLog` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`serverId` int(11) NOT NULL,
`userId` varchar(255) DEFAULT NULL,
`date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`action` int(11) DEFAULT NULL,
`channelId` varchar(255) DEFAULT NULL,
`data` longtext,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `ServerSettings`;
CREATE TABLE `ServerSettings` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`guildId` varchar(255) NOT NULL,
`deleted` datetime DEFAULT NULL,
`prefix` varchar(2) NOT NULL,
`logChannel` varchar(255) DEFAULT NULL,
`modLogChannel` varchar(255) DEFAULT NULL,
`systemNotice` tinyint(1) NOT NULL,
`streamLiveRole` varchar(255) DEFAULT NULL,
`streamShout` varchar(255) DEFAULT NULL,
`streamTimeout` int(11) DEFAULT NULL,
`adminRole` varchar(255) DEFAULT NULL,
`moderatorRole` varchar(255) DEFAULT NULL,
`quoteThreshold` int(11) DEFAULT NULL,
`quoteEmoji` text DEFAULT NULL,
`quoteChannel` varchar(255) DEFAULT NULL,
`muteRole` varchar(255) DEFAULT NULL,
`muteChannel` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `WhiteListedGames`;
CREATE TABLE `WhiteListedGames` (
`guildId` VARCHAR(255) NOT NULL,
`id` VARCHAR(255) NOT NULL,
`name` varchar(255) NOT NULL,
PRIMARY KEY (`guildId`, `name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `WhiteListedRoles`;
CREATE TABLE `WhiteListedRoles` (
`guildId` VARCHAR(255) NOT NULL,
`id` VARCHAR(255) NOT NULL,
PRIMARY KEY (`guildId`, `id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `Quotes`;
CREATE TABLE `Quotes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`guildId` VARCHAR(255) NOT NULL,
`botMessageId` VARCHAR(255) NOT NULL,
`quotedMessageId` VARCHAR(255),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `Muted`;
CREATE TABLE `Muted` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`guildId` VARCHAR(255) NOT NULL,
`userId` varchar(255) NOT NULL,
`byUserId` varchar(255) DEFAULT NULL,
`start` datetime NOT NULL,
`until` datetime NOT NULL,
`end` datetime DEFAULT NULL,
`reason` longtext NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `BlackListedChannels`;
CREATE TABLE `BlackListedChannels` (
`guildId` VARCHAR(255) NOT NULL,
`channelId` VARCHAR(255) NOT NULL,
PRIMARY KEY (`guildId`, `channelId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;