This repository has been archived by the owner on Mar 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
schema.sql
175 lines (149 loc) · 6.1 KB
/
schema.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.3.32-MariaDB-0ubuntu0.20.04.1 - Ubuntu 20.04
-- Server OS: debian-linux-gnu
-- HeidiSQL Version: 11.3.0.6295
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-- Dumping database structure for okey_bot
CREATE DATABASE IF NOT EXISTS `okey_bot` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `okey_bot`;
-- Dumping structure for table okey_bot.bot_data
CREATE TABLE IF NOT EXISTS `bot_data` (
`issued_commands` int(255) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Data exporting was unselected.
-- Dumping structure for table okey_bot.channels
CREATE TABLE IF NOT EXISTS `channels` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`platform_id` varchar(255) NOT NULL,
`login` varchar(25) NOT NULL,
`prefix` varchar(15) NOT NULL DEFAULT '?',
`pajbot_api` varchar(500) DEFAULT NULL,
`logging` tinyint(4) NOT NULL DEFAULT 1,
`added` timestamp NOT NULL DEFAULT current_timestamp(),
`bot_banned` tinyint(4) NOT NULL DEFAULT 0,
`suspended` tinyint(4) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `platform_id` (`platform_id`),
UNIQUE KEY `login` (`login`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Data exporting was unselected.
-- Dumping structure for table okey_bot.confusables
CREATE TABLE IF NOT EXISTS `confusables` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`char` varchar(50) NOT NULL DEFAULT '0',
`conf` varchar(50) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `char` (`char`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Data exporting was unselected.
-- Dumping structure for table okey_bot.emote_rewards
CREATE TABLE IF NOT EXISTS `emote_rewards` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`channel_login` varchar(25) NOT NULL,
`channel_id` varchar(255) NOT NULL,
`app_userid` varchar(500) DEFAULT NULL,
`emote_id` varchar(500) NOT NULL,
`reward_title` varchar(50) NOT NULL,
`app` varchar(50) NOT NULL,
PRIMARY KEY (`id`),
KEY `FK_emotes_channels` (`channel_id`),
CONSTRAINT `FK_emotes_channels` FOREIGN KEY (`channel_id`) REFERENCES `channels` (`platform_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Data exporting was unselected.
-- Dumping structure for table okey_bot.errors
CREATE TABLE IF NOT EXISTS `errors` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(500) NOT NULL DEFAULT '0',
`data` text DEFAULT NULL,
`error` text NOT NULL,
`timestamp` timestamp NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Data exporting was unselected.
-- Dumping structure for table okey_bot.hugs
CREATE TABLE IF NOT EXISTS `hugs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` varchar(255) NOT NULL,
`count` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Data exporting was unselected.
-- Dumping structure for table okey_bot.ignored_users
CREATE TABLE IF NOT EXISTS `ignored_users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` varchar(255) NOT NULL,
`reason` varchar(500) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Data exporting was unselected.
-- Dumping structure for table okey_bot.messages
CREATE TABLE IF NOT EXISTS `messages` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`channel_id` varchar(255) NOT NULL,
`channel_login` varchar(25) NOT NULL,
`user_id` varchar(255) NOT NULL,
`user_login` varchar(25) NOT NULL,
`message` varchar(500) NOT NULL,
`timestamp` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `channel_id` (`channel_id`),
KEY `user_login` (`user_login`),
KEY `timestamp` (`timestamp`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Data exporting was unselected.
-- Dumping structure for table okey_bot.notify_channels
CREATE TABLE IF NOT EXISTS `notify_channels` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` varchar(255) NOT NULL,
`login` varchar(25) NOT NULL,
`live` tinyint(4) NOT NULL DEFAULT 0,
`online_format` varchar(350) NOT NULL,
`offline_format` varchar(350) NOT NULL,
`title_format` varchar(350) NOT NULL,
`category_format` varchar(350) NOT NULL,
`discord_webhook` varchar(500) DEFAULT NULL,
`discord_message` varchar(2000) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Data exporting was unselected.
-- Dumping structure for table okey_bot.notify_users
CREATE TABLE IF NOT EXISTS `notify_users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`channel_id` varchar(255) NOT NULL,
`channel_login` varchar(25) NOT NULL,
`user_id` varchar(255) NOT NULL,
`user_login` varchar(25) NOT NULL,
PRIMARY KEY (`id`),
KEY `FK_notify_channels` (`channel_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Data exporting was unselected.
-- Dumping structure for table okey_bot.suggestions
CREATE TABLE IF NOT EXISTS `suggestions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`author_login` varchar(25) NOT NULL,
`author_id` varchar(255) NOT NULL,
`status` varchar(200) NOT NULL DEFAULT 'Pending Review',
`text` varchar(2000) DEFAULT NULL,
`notes` varchar(2000) DEFAULT NULL,
`created` timestamp NOT NULL DEFAULT current_timestamp(),
`last_update` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`id`),
KEY `author_id` (`author_id`),
KEY `created` (`created`),
KEY `status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Data exporting was unselected.
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */;