-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatabase.sql
111 lines (95 loc) · 3.65 KB
/
database.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
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
SET NAMES utf8mb4;
DROP TABLE IF EXISTS `exceptional_roles`;
CREATE TABLE `exceptional_roles` (
`exceptional_roles_id` int(11) NOT NULL AUTO_INCREMENT,
`guild_id` varchar(32) NOT NULL,
`role_id` varchar(32) NOT NULL,
`added_by` varchar(32) NOT NULL,
`added_date` int(11) NOT NULL,
PRIMARY KEY (`exceptional_roles_id`),
UNIQUE KEY `guild_id_role_id` (`guild_id`,`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
DROP TABLE IF EXISTS `exceptional_roles_deleted`;
CREATE TABLE `exceptional_roles_deleted` (
`exceptional_roles_id` int(11) NOT NULL AUTO_INCREMENT,
`guild_id` varchar(32) NOT NULL,
`role_id` varchar(32) NOT NULL,
`added_by` varchar(32) NOT NULL,
`added_date` int(11) NOT NULL,
`deleted_by` varchar(32) NOT NULL,
`deleted_date` int(11) NOT NULL,
PRIMARY KEY (`exceptional_roles_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
DROP TABLE IF EXISTS `exceptional_users`;
CREATE TABLE `exceptional_users` (
`exceptional_users_id` int(11) NOT NULL AUTO_INCREMENT,
`guild_id` varchar(32) NOT NULL,
`user_id` varchar(32) NOT NULL,
`added_by` varchar(32) NOT NULL,
`added_date` int(11) NOT NULL,
PRIMARY KEY (`exceptional_users_id`),
UNIQUE KEY `guild_id_user_id` (`guild_id`,`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
DROP TABLE IF EXISTS `exceptional_users_deleted`;
CREATE TABLE `exceptional_users_deleted` (
`exceptional_users_id` int(11) NOT NULL AUTO_INCREMENT,
`guild_id` varchar(32) NOT NULL,
`user_id` varchar(32) NOT NULL,
`added_by` varchar(32) NOT NULL,
`added_date` int(11) NOT NULL,
`deleted_by` varchar(32) NOT NULL,
`deleted_date` int(11) NOT NULL,
PRIMARY KEY (`exceptional_users_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
DROP TABLE IF EXISTS `guild_list`;
CREATE TABLE `guild_list` (
`guild_list_id` int(11) NOT NULL AUTO_INCREMENT,
`guild_id` varchar(32) NOT NULL,
`guild_name` varchar(256) NOT NULL,
`guild_joined_date` int(11) NOT NULL,
`log_channel_id` varchar(32) DEFAULT NULL,
`set_by` varchar(32) DEFAULT NULL,
`set_date` int(11) DEFAULT NULL,
`max_ignored_users` tinyint(4) NOT NULL DEFAULT 20,
`max_ignored_roles` tinyint(4) NOT NULL DEFAULT 5,
`maximum_regex` tinyint(4) NOT NULL DEFAULT 5,
PRIMARY KEY (`guild_list_id`),
UNIQUE KEY `guild_id` (`guild_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
DROP TABLE IF EXISTS `guild_list_deleted`;
CREATE TABLE `guild_list_deleted` (
`guild_list_id` int(11) NOT NULL AUTO_INCREMENT,
`guild_id` varchar(32) NOT NULL,
`guild_name` varchar(256) NOT NULL,
`guild_joined_date` int(11) NOT NULL,
`log_channel_id` varchar(32) DEFAULT NULL,
`left_date` int(11) NOT NULL,
PRIMARY KEY (`guild_list_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
DROP TABLE IF EXISTS `name_filters`;
CREATE TABLE `name_filters` (
`name_filters_id` int(11) NOT NULL AUTO_INCREMENT,
`guild_id` varchar(32) NOT NULL,
`regex` tinytext NOT NULL,
`is_active` tinyint(4) NOT NULL DEFAULT 0,
`added_by` varchar(32) NOT NULL,
`added_date` int(11) NOT NULL,
PRIMARY KEY (`name_filters_id`),
UNIQUE KEY `guild_id_regex` (`guild_id`,`regex`) USING HASH
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
DROP TABLE IF EXISTS `name_filters_deleted`;
CREATE TABLE `name_filters_deleted` (
`name_filters_id` int(11) NOT NULL AUTO_INCREMENT,
`guild_id` varchar(32) NOT NULL,
`regex` tinytext NOT NULL,
`is_active` tinyint(4) NOT NULL DEFAULT 0,
`added_by` varchar(32) NOT NULL,
`added_date` int(11) NOT NULL,
`deleted_by` varchar(32) NOT NULL,
`deleted_date` int(11) NOT NULL,
PRIMARY KEY (`name_filters_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;