-
Notifications
You must be signed in to change notification settings - Fork 32
/
mysql.sql
48 lines (48 loc) · 1.94 KB
/
mysql.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
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- -----------------------------------------------------------
-- Table structure for on_client_connected
-- -----------------------------------------------------------
DROP TABLE IF EXISTS `on_client_connected`;
CREATE TABLE `on_client_connected` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`action` varchar(32) DEFAULT NULL,
`node` varchar(32) DEFAULT NULL,
`client_id` varchar(256) DEFAULT NULL,
`username` varchar(256) DEFAULT NULL,
`ip` varchar(32) DEFAULT NULL,
`connected_at` varchar(64),
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC;
-- -----------------------------------------------------------
-- Table structure for on_client_disconnected
-- -----------------------------------------------------------
DROP TABLE IF EXISTS `on_client_disconnected`;
CREATE TABLE `on_client_disconnected` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`action` varchar(32) DEFAULT NULL,
`node` varchar(32) DEFAULT NULL,
`client_id` varchar(256) DEFAULT NULL,
`username` varchar(256) DEFAULT NULL,
`reason` VARCHAR(40) DEFAULT NULL,
`disconnected_at` varchar(64),
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC;
-- -----------------------------------------------------------
-- Table structure for on_client_publish
-- -----------------------------------------------------------
DROP TABLE IF EXISTS `on_client_publish`;
CREATE TABLE `on_client_publish` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`action` varchar(32) DEFAULT NULL,
`node` varchar(32) DEFAULT NULL,
`client_id` varchar(256) DEFAULT NULL,
`username` varchar(256) DEFAULT NULL,
`host` VARCHAR(40) DEFAULT NULL,
`msg_id` varchar(32) DEFAULT NULL,
`topic` TEXT,
`payload` TEXT,
`ts` varchar(64),
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC;
SET FOREIGN_KEY_CHECKS = 1;