Web UI for ARGUS server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

625 lines
28 KiB

/*
Navicat Premium Data Transfer
Source Server : APPLICATION
Source Server Type : MariaDB
Source Server Version : 100323
Source Host : localhost:3316
Source Schema : dfsl_gunter
Target Server Type : MariaDB
Target Server Version : 100323
File Encoding : 65001
Date: 30/08/2021 16:24:18
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for camera_ptz_protocols
-- ----------------------------
DROP TABLE IF EXISTS `camera_ptz_protocols`;
CREATE TABLE `camera_ptz_protocols` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cameras
-- ----------------------------
DROP TABLE IF EXISTS `cameras`;
CREATE TABLE `cameras` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`site_id` int(10) UNSIGNED NULL DEFAULT NULL,
`node_id` int(10) UNSIGNED NULL DEFAULT 0,
`online` tinyint(3) UNSIGNED NULL DEFAULT 0,
`type` tinyint(3) UNSIGNED NOT NULL DEFAULT 1,
`name` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`hardware` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`status` tinyint(3) UNSIGNED NULL DEFAULT 0,
`session` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`protocol` tinyint(3) UNSIGNED NULL DEFAULT NULL,
`protocol_aux` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`uart_id` int(10) UNSIGNED NULL DEFAULT 0,
`lat` double NULL DEFAULT NULL,
`lon` double NULL DEFAULT NULL,
`alt` double NULL DEFAULT NULL,
`pitch` double NULL DEFAULT NULL,
`roll` double NULL DEFAULT NULL,
`yaw` double NULL DEFAULT NULL,
`imager_type` tinyint(3) UNSIGNED NULL DEFAULT 2,
`min_f` double NULL DEFAULT NULL,
`max_f` double NULL DEFAULT NULL,
`pan_model` tinyint(3) UNSIGNED NULL DEFAULT 0,
`pan_angles` int(4) UNSIGNED NULL DEFAULT 0,
`tilt_model` tinyint(3) UNSIGNED NULL DEFAULT 0,
`tilt_angles` tinyint(3) UNSIGNED NULL DEFAULT 0,
`access_login` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`access_pass` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`uuid` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`mac` char(17) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`ip` char(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`port` char(5) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '80',
`onvif_access` char(5) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`onvif_ctrl` char(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`ptz_token` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uni2`(`uuid`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for cmd_queue
-- ----------------------------
DROP TABLE IF EXISTS `cmd_queue`;
CREATE TABLE `cmd_queue` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`site_id` int(10) UNSIGNED NULL DEFAULT NULL,
`status` tinyint(3) UNSIGNED NULL DEFAULT 0,
`cmd` tinyint(3) UNSIGNED NULL DEFAULT NULL,
`param` char(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`aux_param` char(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING HASH
) ENGINE = MEMORY AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for connection_types
-- ----------------------------
DROP TABLE IF EXISTS `connection_types`;
CREATE TABLE `connection_types` (
`id` tinyint(3) UNSIGNED NOT NULL AUTO_INCREMENT,
`label_id` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for connections
-- ----------------------------
DROP TABLE IF EXISTS `connections`;
CREATE TABLE `connections` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`site_id` int(10) UNSIGNED NULL DEFAULT NULL,
`from` int(10) UNSIGNED NULL DEFAULT NULL,
`from_aux` int(10) UNSIGNED NULL DEFAULT NULL,
`to` int(10) UNSIGNED NULL DEFAULT NULL,
`to_aux` int(10) UNSIGNED NULL DEFAULT NULL,
`type` tinyint(3) UNSIGNED NULL DEFAULT 0,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for events_archive
-- ----------------------------
DROP TABLE IF EXISTS `events_archive`;
CREATE TABLE `events_archive` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`node_id` int(10) UNSIGNED NOT NULL,
`uuid` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`ts` int(10) UNSIGNED NOT NULL,
`ts_ms` int(3) UNSIGNED NOT NULL,
`evt_type` tinyint(3) UNSIGNED NULL DEFAULT 1,
`range_digital` int(5) UNSIGNED NULL DEFAULT NULL,
`azimuth` double NULL DEFAULT NULL,
`elevation` double NULL DEFAULT 0,
`range` double NULL DEFAULT NULL,
`area` double NULL DEFAULT NULL,
`lat` double NULL DEFAULT NULL,
`lon` double NULL DEFAULT NULL,
`alt` double NULL DEFAULT NULL,
`custom` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uniq`(`uuid`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 6765 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for events_cloud
-- ----------------------------
DROP TABLE IF EXISTS `events_cloud`;
CREATE TABLE `events_cloud` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`node_id` int(10) UNSIGNED NOT NULL,
`uuid` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`ts` int(10) UNSIGNED NOT NULL,
`ts_ms` int(3) UNSIGNED NOT NULL,
`evt_type` tinyint(3) UNSIGNED NULL DEFAULT 1,
`range_digital` int(5) UNSIGNED NULL DEFAULT NULL,
`azimuth` double NULL DEFAULT NULL,
`elevation` double NULL DEFAULT 0,
`range` double NULL DEFAULT NULL,
`area` double NULL DEFAULT NULL,
`lat` double NULL DEFAULT NULL,
`lon` double NULL DEFAULT NULL,
`alt` double NULL DEFAULT NULL,
`custom` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING HASH,
UNIQUE INDEX `uniq`(`uuid`) USING HASH
) ENGINE = MEMORY AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for labels_js
-- ----------------------------
DROP TABLE IF EXISTS `labels_js`;
CREATE TABLE `labels_js` (
`language_id` tinyint(3) UNSIGNED NULL DEFAULT NULL,
`key` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`label` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
UNIQUE INDEX `uniq`(`language_id`, `key`) USING BTREE,
INDEX `lang`(`language_id`) USING BTREE
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for labels_php
-- ----------------------------
DROP TABLE IF EXISTS `labels_php`;
CREATE TABLE `labels_php` (
`language_id` tinyint(3) UNSIGNED NULL DEFAULT NULL,
`key` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`label` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
UNIQUE INDEX `uniq`(`language_id`, `key`) USING BTREE,
INDEX `lang`(`language_id`) USING BTREE
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for languages
-- ----------------------------
DROP TABLE IF EXISTS `languages`;
CREATE TABLE `languages` (
`id` tinyint(3) UNSIGNED NOT NULL AUTO_INCREMENT,
`abbr` char(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`name` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for lrf_draw
-- ----------------------------
DROP TABLE IF EXISTS `lrf_draw`;
CREATE TABLE `lrf_draw` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`node_id` int(10) UNSIGNED NULL DEFAULT NULL,
`size` int(10) UNSIGNED NULL DEFAULT NULL,
`ts` datetime(0) NULL DEFAULT NULL,
`md5` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`rendered` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'N',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `Uni`(`node_id`, `ts`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 31 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for lrf_sensors
-- ----------------------------
DROP TABLE IF EXISTS `lrf_sensors`;
CREATE TABLE `lrf_sensors` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`type_id` tinyint(3) UNSIGNED NULL DEFAULT 1,
`altered` bit(1) NULL DEFAULT b'0',
`position` bit(1) NOT NULL DEFAULT b'0',
`sender` bit(1) NOT NULL DEFAULT b'0',
`receiver` bit(1) NOT NULL DEFAULT b'0',
`serial` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`version` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`lat` double NULL DEFAULT NULL,
`lon` double NULL DEFAULT NULL,
`alt` double NULL DEFAULT NULL,
`pitch` double NULL DEFAULT NULL,
`yaw` double NULL DEFAULT NULL,
`roll` double NULL DEFAULT NULL,
`uart_id` int(10) UNSIGNED NULL DEFAULT 0,
`device_id` int(10) UNSIGNED NULL DEFAULT 0,
`ip_address` char(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`aux_ip_address` char(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`port` char(5) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`aux_port` char(5) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`auto_draw` tinyint(3) UNSIGNED NULL DEFAULT 0,
`enabled_lrf` bit(16) NULL DEFAULT b'1111111111111111',
`max_range` float UNSIGNED NULL DEFAULT 300,
`base_shift` int(11) NULL DEFAULT 0,
`mirror_shift` int(11) NULL DEFAULT 0,
`m_order` int(10) UNSIGNED NULL DEFAULT NULL,
`m_offset` int(10) UNSIGNED NULL DEFAULT NULL,
`m_delta` int(10) UNSIGNED NULL DEFAULT NULL,
`m_flip` int(10) UNSIGNED NULL DEFAULT NULL,
`m_width` int(10) UNSIGNED NULL DEFAULT NULL,
`m_sst` int(10) UNSIGNED NULL DEFAULT NULL,
`m_sun` tinyint(3) UNSIGNED NULL DEFAULT 100,
`m_gp` int(10) UNSIGNED NULL DEFAULT 16,
`m_spikes` int(10) UNSIGNED NULL DEFAULT 0,
`s_order` int(10) UNSIGNED NULL DEFAULT NULL,
`s_offset` int(10) UNSIGNED NULL DEFAULT NULL,
`s_delta` int(10) UNSIGNED NULL DEFAULT NULL,
`s_flip` int(10) UNSIGNED NULL DEFAULT NULL,
`s_width` int(10) UNSIGNED NULL DEFAULT NULL,
`s_sst` int(10) UNSIGNED NULL DEFAULT NULL,
`s_sun` tinyint(3) UNSIGNED NULL DEFAULT 100,
`s_gp` int(10) UNSIGNED NULL DEFAULT 16,
`s_spikes` int(10) UNSIGNED NULL DEFAULT 0,
`width_table_id` int(10) UNSIGNED NULL DEFAULT 0,
`zoom_table_id` int(10) UNSIGNED NULL DEFAULT 0,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for map_tiles
-- ----------------------------
DROP TABLE IF EXISTS `map_tiles`;
CREATE TABLE `map_tiles` (
`z` tinyint(3) UNSIGNED NULL DEFAULT 0,
`x` int(10) UNSIGNED NULL DEFAULT NULL,
`y` int(10) UNSIGNED NULL DEFAULT NULL,
`cached` tinyint(1) UNSIGNED NULL DEFAULT 1,
`isSea` tinyint(1) UNSIGNED NULL DEFAULT 0,
UNIQUE INDEX `Uni`(`z`, `x`, `y`) USING BTREE,
INDEX `norm_x`(`x`) USING BTREE,
INDEX `norm_y`(`y`) USING BTREE,
INDEX `norm_z`(`z`) USING BTREE
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for maps
-- ----------------------------
DROP TABLE IF EXISTS `maps`;
CREATE TABLE `maps` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`site_id` int(10) UNSIGNED NULL DEFAULT NULL,
`tale_src` char(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for media_server_streams
-- ----------------------------
DROP TABLE IF EXISTS `media_server_streams`;
CREATE TABLE `media_server_streams` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`site_id` int(10) UNSIGNED NULL DEFAULT NULL,
`media_server_id` int(10) UNSIGNED NOT NULL,
`media_stream_id` int(10) UNSIGNED NOT NULL,
`valid` tinyint(1) UNSIGNED NULL DEFAULT 0,
`online` tinyint(1) UNSIGNED NULL DEFAULT 0,
`key` char(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`mrl` char(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for media_servers
-- ----------------------------
DROP TABLE IF EXISTS `media_servers`;
CREATE TABLE `media_servers` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`secret_key` char(46) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`ip` char(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '127.0.0.1',
`REST_port` int(5) UNSIGNED NULL DEFAULT 8081,
`virtual_host` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '__defaultVhost__',
`recording` tinyint(1) UNSIGNED NULL DEFAULT 0,
`local` tinyint(1) UNSIGNED NULL DEFAULT 0,
`docRoot` char(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for media_streams
-- ----------------------------
DROP TABLE IF EXISTS `media_streams`;
CREATE TABLE `media_streams` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`site_id` int(10) UNSIGNED NULL DEFAULT NULL,
`source_id` int(10) UNSIGNED NOT NULL,
`source_type` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'D',
`name` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`valid` tinyint(1) UNSIGNED NULL DEFAULT 0,
`has_audio` tinyint(1) UNSIGNED NULL DEFAULT 0,
`token` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`img_width` int(10) UNSIGNED NULL DEFAULT NULL,
`img_height` int(10) UNSIGNED NULL DEFAULT NULL,
`fps` tinyint(3) UNSIGNED NULL DEFAULT NULL,
`compression_type` char(4) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`bitrate` int(10) UNSIGNED NULL DEFAULT NULL,
`mrl_proto` char(5) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'rtsp',
`mrl_port` char(5) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '554',
`mrl` char(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`picture_proto` char(5) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'http',
`picture_port` char(5) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '80',
`picture` char(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `unistr`(`site_id`, `source_id`, `token`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for module_dcr_chanels
-- ----------------------------
DROP TABLE IF EXISTS `module_dcr_chanels`;
CREATE TABLE `module_dcr_chanels` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`dcr_id` int(10) UNSIGNED NOT NULL,
`channel_id` tinyint(3) UNSIGNED NULL DEFAULT NULL,
`mode` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'O',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'O',
`request` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'N',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uni`(`dcr_id`, `channel_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for module_dcr_settings
-- ----------------------------
DROP TABLE IF EXISTS `module_dcr_settings`;
CREATE TABLE `module_dcr_settings` (
`setting_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`channel_id` int(10) UNSIGNED NOT NULL,
`type` char(1) CHARACTER SET ascii COLLATE ascii_general_ci NULL DEFAULT 'P',
`class_id` int(10) UNSIGNED NOT NULL,
`event_id` int(10) UNSIGNED NOT NULL,
`auto_dissmiss` tinyint(3) UNSIGNED NULL DEFAULT 0,
PRIMARY KEY (`setting_id`) USING BTREE,
UNIQUE INDEX `uni`(`channel_id`, `class_id`, `event_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for module_kafka_settings
-- ----------------------------
DROP TABLE IF EXISTS `module_kafka_settings`;
CREATE TABLE `module_kafka_settings` (
`setting_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`module_id` int(10) UNSIGNED NOT NULL,
`type` char(1) CHARACTER SET ascii COLLATE ascii_general_ci NULL DEFAULT 'P',
`class_id` int(10) UNSIGNED NOT NULL,
`event_id` int(10) UNSIGNED NOT NULL,
`topic` char(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`template` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`setting_id`) USING BTREE,
UNIQUE INDEX `uni`(`module_id`, `class_id`, `event_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for modules_dcr
-- ----------------------------
DROP TABLE IF EXISTS `modules_dcr`;
CREATE TABLE `modules_dcr` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`site_id` int(10) UNSIGNED NULL DEFAULT NULL,
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'O',
`serial_id` char(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
`channels` tinyint(3) UNSIGNED NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uni`(`site_id`, `serial_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for modules_fly_hunter
-- ----------------------------
DROP TABLE IF EXISTS `modules_fly_hunter`;
CREATE TABLE `modules_fly_hunter` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`lat` double NULL DEFAULT NULL,
`lon` double NULL DEFAULT NULL,
`alt` double NULL DEFAULT NULL,
`dc_module_id` int(10) UNSIGNED NULL DEFAULT 0,
`uart_id` int(10) UNSIGNED NULL DEFAULT 0,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for modules_kafka
-- ----------------------------
DROP TABLE IF EXISTS `modules_kafka`;
CREATE TABLE `modules_kafka` (
`module_id` int(10) UNSIGNED NOT NULL,
`brocker_address` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`brocker_port` int(10) UNSIGNED NULL DEFAULT NULL,
PRIMARY KEY (`module_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for nodes
-- ----------------------------
DROP TABLE IF EXISTS `nodes`;
CREATE TABLE `nodes` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`site_id` int(10) UNSIGNED NOT NULL DEFAULT 0,
`type` tinyint(3) UNSIGNED NOT NULL,
`aux_id` int(10) UNSIGNED NULL DEFAULT 0,
`online` tinyint(3) UNSIGNED NULL DEFAULT 0,
`enable` char(1) CHARACTER SET ascii COLLATE ascii_general_ci NULL DEFAULT 'E',
`ts_s` int(11) NULL DEFAULT 0,
`ts_ms` int(11) NULL DEFAULT 0,
`data_peers_in` tinyint(3) UNSIGNED NULL DEFAULT 0,
`data_peers_out` tinyint(3) UNSIGNED NULL DEFAULT 0,
`ctrl_peers_in` tinyint(3) UNSIGNED NULL DEFAULT 0,
`ctrl_peers_out` tinyint(3) UNSIGNED NULL DEFAULT 0,
`name` char(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'No Name',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uni`(`site_id`, `type`, `aux_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for online_cloud
-- ----------------------------
DROP TABLE IF EXISTS `online_cloud`;
CREATE TABLE `online_cloud` (
`device_id` int(10) UNSIGNED NOT NULL DEFAULT 0,
`fts` datetime(0) NULL DEFAULT NULL,
`lts` datetime(0) NULL DEFAULT NULL,
`mode` tinyint(4) NULL DEFAULT NULL,
`draw_sequence` int(10) UNSIGNED NULL DEFAULT NULL,
`data` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`parameter` int(11) NULL DEFAULT NULL,
PRIMARY KEY (`device_id`) USING HASH
) ENGINE = MEMORY CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for pictures
-- ----------------------------
DROP TABLE IF EXISTS `pictures`;
CREATE TABLE `pictures` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`md5` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`ext` char(3) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`TS` datetime(0) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for server_module_types
-- ----------------------------
DROP TABLE IF EXISTS `server_module_types`;
CREATE TABLE `server_module_types` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`builtin` bit(1) NULL DEFAULT b'0',
`allow_multiply` bit(1) NULL DEFAULT b'1',
`name` char(16) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for server_modules
-- ----------------------------
DROP TABLE IF EXISTS `server_modules`;
CREATE TABLE `server_modules` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`server_id` int(10) UNSIGNED NOT NULL,
`type` tinyint(3) UNSIGNED NOT NULL,
`aux_id` int(10) UNSIGNED NULL DEFAULT NULL,
`enabled` tinyint(1) UNSIGNED NULL DEFAULT 1,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for servers
-- ----------------------------
DROP TABLE IF EXISTS `servers`;
CREATE TABLE `servers` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`site_id` int(10) UNSIGNED NULL DEFAULT NULL,
`online` bit(1) NULL DEFAULT b'0',
`identity` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uni`(`identity`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for servers_queue
-- ----------------------------
DROP TABLE IF EXISTS `servers_queue`;
CREATE TABLE `servers_queue` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`server_id` int(10) UNSIGNED NOT NULL,
`ts` datetime(0) NOT NULL,
`started` bit(1) NULL DEFAULT b'0',
`done` bit(1) NULL DEFAULT b'0',
`success` bit(1) NULL DEFAULT b'0',
`progress` tinyint(3) UNSIGNED NULL DEFAULT 0,
`command` tinyint(3) UNSIGNED NOT NULL,
`param` char(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING HASH
) ENGINE = MEMORY AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for sites
-- ----------------------------
DROP TABLE IF EXISTS `sites`;
CREATE TABLE `sites` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`account_id` int(10) UNSIGNED NULL DEFAULT NULL,
`name` char(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`server_ident` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`anchor_lat` double NULL DEFAULT 0,
`anchor_lon` double NULL DEFAULT 0,
`anchor_alt` double NULL DEFAULT 0,
`hemisphere` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'N',
`map_id` tinyint(5) UNSIGNED NULL DEFAULT 0,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for sockets
-- ----------------------------
DROP TABLE IF EXISTS `sockets`;
CREATE TABLE `sockets` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`node_id` int(10) UNSIGNED NOT NULL,
`aux_id` int(10) UNSIGNED NULL DEFAULT NULL,
`type` tinyint(3) UNSIGNED NOT NULL,
`md5` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`multidrop` tinyint(1) UNSIGNED NULL DEFAULT 0,
`mode` tinyint(3) UNSIGNED NULL DEFAULT 0,
`binded` tinyint(1) UNSIGNED NULL DEFAULT 0,
`path` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`name` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uni`(`node_id`, `type`, `md5`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for uart_settings
-- ----------------------------
DROP TABLE IF EXISTS `uart_settings`;
CREATE TABLE `uart_settings` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`type` tinyint(3) UNSIGNED NULL DEFAULT 1,
`socket_id` int(10) UNSIGNED NOT NULL,
`speed` int(10) UNSIGNED NULL DEFAULT 19200,
`bit` tinyint(3) UNSIGNED NULL DEFAULT 8,
`parity` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'N',
`stop_bit` float(2, 1) UNSIGNED NULL DEFAULT 1,
`mode` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`port` int(11) NULL DEFAULT NULL,
`path` char(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for users
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`login` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`pwdMD5` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`SID` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`create_ts` datetime(0) NULL DEFAULT NULL,
`login_ts` datetime(0) NULL DEFAULT NULL,
`access` tinyint(3) UNSIGNED NULL DEFAULT 0,
`language` tinyint(3) UNSIGNED NULL DEFAULT 1,
`width` int(10) UNSIGNED NULL DEFAULT 1024,
`height` int(10) UNSIGNED NULL DEFAULT 768,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for users_dash_layout
-- ----------------------------
DROP TABLE IF EXISTS `users_dash_layout`;
CREATE TABLE `users_dash_layout` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`user_id` int(10) UNSIGNED NULL DEFAULT NULL,
`node_id` int(10) UNSIGNED NULL DEFAULT NULL,
`x` tinyint(3) UNSIGNED NULL DEFAULT NULL,
`y` tinyint(3) UNSIGNED NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;