大量更新

This commit is contained in:
zeaslity
2026-05-19 14:28:44 +08:00
parent a8f6bda703
commit 9fc3372fa3
5299 changed files with 423176 additions and 426690 deletions

View File

@@ -0,0 +1,30 @@
create database if not exists emqx DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
use emqx;
CREATE TABLE `mqtt_user` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT comment 'id',
`username` varchar(100) DEFAULT NULL comment '用户名',
`password_hash` varchar(100) DEFAULT NULL comment '密码',
`salt` varchar(35) DEFAULT NULL comment '',
`is_superuser` tinyint(1) DEFAULT 0 comment '是否是超管',
`created` datetime DEFAULT NULL comment '创建时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_mqtt_username` (`username`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 comment 'mqtt用户表';
CREATE TABLE `mqtt_acl` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT comment 'id',
`username` varchar(100) NOT NULL comment '用户',
`permission` varchar(5) NOT NULL comment '权限 allow 和 deny',
`action` varchar(9) NOT NULL comment '动作 publish、subscribe 和 all',
`topic` varchar(100) NOT NULL comment '主题',
`qos` tinyint(1) comment '可选值为 0、1、2也可以用 , 分隔的字符串指定多个 QoS例如 0,1。默认为全部 QoS',
`retain` tinyint(1) comment '可选)用于指定当前规则是否支持发布保留消息,可选值有 0、1默认允许保留消息',
INDEX idx_username(username),
PRIMARY KEY (`id`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 comment 'mqtt权限表';
alter table mqtt_user
add is_del bit default b'0' null comment '是否删除';
alter table mqtt_acl
add is_del bit default b'0' null comment '是否删除';
alter table mqtt_acl
add is_data bit default b'0' null comment '是否是数据(探测目标)';

View File

@@ -0,0 +1,2 @@
ALTER TABLE uav_alarm.uav_alarm_event
CHANGE event_start_time event_start_time TIMESTAMP(6) NULL COMMENT '告警处理时间';

View File

@@ -0,0 +1,45 @@
create database if not exists uav_cloud_live DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
use uav_cloud_live;
delete from live_plugin_config where 1=1;
insert into `live_plugin_config` (`id`, `plugin_name`, `plugin_description`, `query_param`, `is_del`, `is_frozen`, `create_at`, `update_at`, `create_by`, `update_by`) values('1','personAi','人群计数','{\"plugin_args\":1}',b'1',b'1','2022-07-12 16:36:24','2024-06-24 14:00:01','1','1');
insert into `live_plugin_config` (`id`, `plugin_name`, `plugin_description`, `query_param`, `is_del`, `is_frozen`, `create_at`, `update_at`, `create_by`, `update_by`) values('2','vehicleAi','车流量识别','{\"plugin_args\":2}',b'1',b'1','2022-07-19 14:44:23','2024-06-24 14:23:10','1','1');
insert into `live_plugin_config` (`id`, `plugin_name`, `plugin_description`, `query_param`, `is_del`, `is_frozen`, `create_at`, `update_at`, `create_by`, `update_by`) values('3','personVehicleAi','人车识别','{\"plugin_args\":3}',b'1',b'1','2022-07-19 17:24:44','2024-06-24 14:23:14','1','1');
insert into `live_plugin_config` (`id`, `plugin_name`, `plugin_description`, `query_param`, `is_del`, `is_frozen`, `create_at`, `update_at`, `create_by`, `update_by`) values('4','vehicleTrackAi','车辆跟踪识别','{\"plugin_args\":4}',b'1',b'1','2022-09-20 14:15:49','2024-06-24 15:03:01','1','1');
insert into `live_plugin_config` (`id`, `plugin_name`, `plugin_description`, `query_param`, `is_del`, `is_frozen`, `create_at`, `update_at`, `create_by`, `update_by`) values('5','plateAi','车牌识别','{\"plugin_args\":8}',b'1',b'1','2022-07-12 16:11:42','2024-06-24 15:03:10','1','1');
insert into `live_plugin_config` (`id`, `plugin_name`, `plugin_description`, `query_param`, `is_del`, `is_frozen`, `create_at`, `update_at`, `create_by`, `update_by`) values('6','fireAi','火情识别','{\"plugin_args\":16}',b'1',b'1','2022-07-11 16:53:35','2024-06-24 15:03:18','1','1');
insert into `live_plugin_config` (`id`, `plugin_name`, `plugin_description`, `query_param`, `is_del`, `is_frozen`, `create_at`, `update_at`, `create_by`, `update_by`) values('7','smokeAi','烟雾识别','{\"plugin_args\":32}',b'0',b'0','2022-09-20 14:15:55','2022-09-20 14:28:38','1','1');
insert into `live_plugin_config` (`id`, `plugin_name`, `plugin_description`, `query_param`, `is_del`, `is_frozen`, `create_at`, `update_at`, `create_by`, `update_by`) values('8','file2rtmp','文件推流','{\"fileUrl\":\"请替换为文件下载地址\"}',b'0',b'0','2022-07-19 17:25:30','2022-09-20 14:20:44','1','1');
insert into `live_plugin_config` (`id`, `plugin_name`, `plugin_description`, `query_param`, `is_del`, `is_frozen`, `create_at`, `update_at`, `create_by`, `update_by`) values('9','gdr_server','GDR服务','{}',b'0',b'0','2022-07-19 14:47:18','2022-09-20 14:20:59','1','1');
insert into `live_plugin_config` (`id`, `plugin_name`, `plugin_description`, `query_param`, `is_del`, `is_frozen`, `create_at`, `update_at`, `create_by`, `update_by`) values('10','gdr_transcode','GDR转码','{}',b'0',b'0','2022-07-12 16:37:18','2022-09-20 14:28:38','1','1');
insert into `live_plugin_config` (`id`, `plugin_name`, `plugin_description`, `query_param`, `is_del`, `is_frozen`, `create_at`, `update_at`, `create_by`, `update_by`) values('11','createLive','创建视频流','{}',b'0',b'0','2022-07-25 14:13:38','2022-09-20 14:21:04','1','1');
insert into `live_plugin_config` (`id`, `plugin_name`, `plugin_description`, `query_param`, `is_del`, `is_frozen`, `create_at`, `update_at`, `create_by`, `update_by`) values('12','createTempLive','创建临时视频流','{}',b'0',b'0','2022-07-25 14:13:56','2022-09-20 14:21:06','1','1');
insert into `live_plugin_config` (`id`, `plugin_name`, `plugin_description`, `query_param`, `is_del`, `is_frozen`, `create_at`, `update_at`, `create_by`, `update_by`) values('13','safetyHatAi','安全帽识别','{\"plugin_args\":64}',b'0',b'0','2022-12-05 17:29:09','2022-12-05 17:40:10','1','1');
insert into `live_plugin_config` (`id`, `plugin_name`, `plugin_description`, `query_param`, `is_del`, `is_frozen`, `create_at`, `update_at`, `create_by`, `update_by`) values('14','excavatorAi','挖掘机识别','{\"plugin_args\":128}',b'0',b'0','2022-12-05 17:30:16','2022-12-05 17:40:10','1','1');
insert into `live_plugin_config` (`id`, `plugin_name`, `plugin_description`, `query_param`, `is_del`, `is_frozen`, `create_at`, `update_at`, `create_by`, `update_by`) values('15','highwayObstacleDetection','公路障碍物检测','{\"plugin_args\":172}',b'0',b'0','2024-06-24 14:25:00','2024-06-24 14:43:25','1','1');
insert into `live_plugin_config` (`id`, `plugin_name`, `plugin_description`, `query_param`, `is_del`, `is_frozen`, `create_at`, `update_at`, `create_by`, `update_by`) values('16','highwayPersonDetection','公路行人检测\n','{\"plugin_args\":173}',b'0',b'0','2024-06-24 14:26:24','2024-06-24 14:43:25','1','1');
insert into `live_plugin_config` (`id`, `plugin_name`, `plugin_description`, `query_param`, `is_del`, `is_frozen`, `create_at`, `update_at`, `create_by`, `update_by`) values('17','highwayManyVehicleDetection','公路密集车辆检测','{\"plugin_args\":174}',b'0',b'0','2024-06-24 14:27:31','2024-06-24 14:43:25','1','1');
insert into `live_plugin_config` (`id`, `plugin_name`, `plugin_description`, `query_param`, `is_del`, `is_frozen`, `create_at`, `update_at`, `create_by`, `update_by`) values('18','peopleCrowdDetection','密集人群检测\n','{\"plugin_args\":175}',b'0',b'0','2024-06-24 13:59:45','2024-06-24 14:43:25','1','1');
insert into `live_plugin_config` (`id`, `plugin_name`, `plugin_description`, `query_param`, `is_del`, `is_frozen`, `create_at`, `update_at`, `create_by`, `update_by`) values('20','ai_recognition','AI通用识别','{\"plugin_args\":\"112\",\"desc\":\"plugin_args取值由识别目标确定如:112:红外人体识别,113:海上救援人员识别,114:周界入侵,122:空中目标检测\"}',b'0',b'0','2024-06-24 15:01:01','2024-06-24 15:09:21',NULL,NULL);
alter table `uav_cloud_live`.`video_merge_task` add column `task_source` varchar (16) NULL COMMENT '合成任务来源:ob:作业回传影像flight:飞行记录; playback:数据回放&视频回放other:其他' after `device_code`;
alter table `uav_cloud_live`.`video_merge_task` add index `idx_video_start_time` (`video_start_time`);
alter table `uav_cloud_live`.`video_segment` add column `file_size` bigint (20) NULL COMMENT '视频片段文件时长(B)' after `video_time`;
CREATE TABLE `video_merge_task_result` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`task_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '任务编号',
`file_index` int DEFAULT NULL COMMENT '文件顺序号123',
`file_name` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '存储文件名',
`file_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '文件id',
`file_size` bigint DEFAULT NULL COMMENT '文件大小B',
`file_start_time` datetime DEFAULT NULL COMMENT '文件实际开始时间',
`file_end_time` datetime DEFAULT NULL COMMENT '文件实际结束时间',
`update_at` datetime DEFAULT NULL COMMENT '修改时间',
`create_at` datetime DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `idx_task_file` (`task_code`,`file_index`),
KEY `idx_file_id` (`file_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin comment='视频文件明细表';
alter table `uav_cloud_live`.`stream_config` drop key `uniq_device_name`;
alter table `uav_cloud_live`.`stream_config` add index `idx_tenant_deviceName` (`tenant_id`, `device_name`);
update uav_cloud_live.stream_config t1 , uav_dev.uav_load_cam t2 set t1.device_name = t2.load_name where t1.device_code = t2.load_code and t2.load_type='LOAD_CAM_MODEL' and t2.load_name is not null ;

View File

@@ -0,0 +1,10 @@
create database if not exists uav_data_post_process DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
use uav_data_post_process;
alter table data_management
add error_message varchar(100) null comment '错误信息';
alter table product_management
add error_message varchar(100) null comment '错误信息';
alter table result_management
add error_message varchar(100) null comment '错误信息';

View File

@@ -0,0 +1,194 @@
create database if not exists uav_industrial_portfolio DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
use uav_industrial_portfolio;
ALTER TABLE `uav_industrial_portfolio`.`civil_military_bts_info` ADD COLUMN `bts_community_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '物理小区名称' AFTER `radar_id`;
ALTER TABLE `uav_industrial_portfolio`.`civil_military_bts_info` ADD COLUMN `bts_community_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '物理小区编号' AFTER `bts_community_name`;
ALTER TABLE `uav_industrial_portfolio`.`civil_military_bts_info` ADD COLUMN `bts_info_dip_angle` decimal(5, 1) NULL DEFAULT 19.0 COMMENT '下傾角(°)(上傾用負數角度表示)' AFTER `bts_sector_angle`;
ALTER TABLE `uav_industrial_portfolio`.`civil_military_bts_info` ADD COLUMN `bts_info_vertical_sector_angle` decimal(5, 1) NULL DEFAULT 25.0 COMMENT '垂直扇形角度' AFTER `bts_info_dip_angle`;
ALTER TABLE `uav_industrial_portfolio`.`civil_military_bts_info` ADD COLUMN `altitude` decimal(5, 1) NULL DEFAULT NULL COMMENT '地面海拔高度' AFTER `bts_info_vertical_sector_angle`;
ALTER TABLE `uav_industrial_portfolio`.`civil_military_bts_record_info` ADD COLUMN `bts_community_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '物理小区名称' AFTER `radar_id`;
ALTER TABLE `uav_industrial_portfolio`.`civil_military_bts_record_info` ADD COLUMN `bts_community_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '物理小区编号' AFTER `bts_community_name`;
ALTER TABLE `uav_industrial_portfolio`.`civil_military_bts_record_info` ADD COLUMN `bts_info_dip_angle` decimal(5, 1) NULL DEFAULT 19.0 COMMENT '下傾角(°)(上傾用負數角度表示)' AFTER `bts_sector_angle`;
ALTER TABLE `uav_industrial_portfolio`.`civil_military_bts_record_info` ADD COLUMN `bts_info_vertical_sector_angle` decimal(5, 1) NULL DEFAULT 25.0 COMMENT '垂直扇形角度' AFTER `bts_info_dip_angle`;
ALTER TABLE `uav_industrial_portfolio`.`civil_military_bts_record_info` ADD COLUMN `altitude` decimal(5, 1) NULL DEFAULT NULL COMMENT '地面海拔高度' AFTER `bts_info_vertical_sector_angle`;
ALTER TABLE `uav_industrial_portfolio`.`civil_military_statisic` DROP INDEX `idx_bts_statistic`;
ALTER TABLE `uav_industrial_portfolio`.`civil_military_statisic` ADD COLUMN `bts_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '基站编码' AFTER `bts_id`;
ALTER TABLE `uav_industrial_portfolio`.`civil_military_statisic` ADD COLUMN `dimension` int NULL DEFAULT 0 COMMENT '维度0:全部 1:年 2:月 3:周 4:日 ' AFTER `bts_code`;
ALTER TABLE `uav_industrial_portfolio`.`civil_military_statisic` ADD COLUMN `dimension_value` int NULL DEFAULT NULL COMMENT '2024月202401日20240101' AFTER `dimension`;
ALTER TABLE `uav_industrial_portfolio`.`civil_military_statisic` MODIFY COLUMN `bts_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '基站id';
ALTER TABLE `uav_industrial_portfolio`.`civil_military_statisic` MODIFY COLUMN `update_at` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间';
ALTER TABLE `uav_industrial_portfolio`.`civil_military_statisic` ADD INDEX `idx_bts_statistic_dim`(`bts_code`, `dimension`, `dimension_value`) USING BTREE;
ALTER TABLE `uav_industrial_portfolio`.`civil_military_detection_configure_info` ADD COLUMN `suppression_num` int NULL DEFAULT NULL COMMENT '虚警的抑制点数' AFTER `keep_duration`;
ALTER TABLE `uav_industrial_portfolio`.`civil_military_track` ADD INDEX `idx_track_create_at`(`create_at`) USING BTREE;
ALTER TABLE `uav_industrial_portfolio`.`civil_military_alarm` ADD COLUMN `area_type` int NULL DEFAULT NULL COMMENT '告警的区域类型0规划区域告警1基站探测区域告警' AFTER `aerocraft_id`;
ALTER TABLE `uav_industrial_portfolio`.`civil_military_alarm` ADD INDEX `idx_aerocraft`(`company_id`, `aerocraft_type`, `aerocraft_id`, `area_type`) USING BTREE;
ALTER TABLE `uav_industrial_portfolio`.`civil_military_alarm`
ADD INDEX `idx_company_id_status`(`company_id`, `status`) USING BTREE;
ALTER TABLE `uav_industrial_portfolio`.`civil_military_alarm`
ADD INDEX `idx_status_update_at`(`status`, `update_at`);
alter table civil_military_bts_info
add origin varchar(50) null comment '数据来源';
-- auto-generated definition
create table traffic_flight_info
(
id bigint auto_increment
primary key comment '主键 ID',
flight_no varchar(50) not null comment '航班号',
takeoff_time time not null comment '起飞时间',
landing_time time not null comment '降落时间',
runway_no varchar(50) not null comment '跑道编号',
aircraft_type varchar(50) null comment '机型',
org_id bigint null comment '所属组织',
create_id bigint null comment '创建人',
create_time datetime null comment '创建时间',
modify_id bigint null comment '更新人',
modify_time datetime null comment '更新时间',
deleted bit default b'0' not null comment '删除标记'
)
comment '航班信息-智慧交通中应用';
-- auto-generated definition
create table traffic_runway_info
(
id bigint unsigned auto_increment
primary key comment '主键 ID',
runway_no varchar(50) null comment '跑道编号',
runway_name varchar(50) null comment '跑道名称',
left_top_lng decimal(20, 7) null comment '左上经度',
left_top_lat decimal(20, 7) null comment '左上纬度',
left_bottom_lng decimal(20, 7) null comment '左下经度',
left_bottom_lat decimal(20, 7) null comment '左下纬度',
right_top_lng decimal(20, 7) null comment '右上经度',
right_top_lat int null comment '右上纬度',
right_bottom_lng decimal(20, 7) null comment '右下经度',
right_bottom_lat decimal(20, 7) null comment '右下纬度',
org_id bigint null comment '所属组织',
create_id bigint null comment '创建人',
create_time datetime null comment '创建时间',
modify_id bigint null comment '更新人',
modify_time datetime null comment '更新时间',
deleted bit default b'0' null comment '删除标记'
)
comment '跑道信息-智慧交通';
create table traffic_airport_warn_info
(
id bigint not null comment '主键 ID',
warn_time datetime null comment '告警时间',
runway_no int null comment '跑道编号',
warn_info varchar(100) null comment '告警详情',
flight_about varchar(100) null comment '影响航班',
invader_lng decimal(20, 7) null comment '入侵物经度',
invader_lat decimal(20, 7) null comment '入侵物纬度',
handle_state int(4) null comment '处理状态,0:未处理1:已处理',
handle_info varchar(255) null comment '处理意见',
handle_id bigint null comment '处理人',
handle_time datetime null comment '处理时间',
org_id bigint null comment '所属组织',
create_id bigint null comment '创建人',
create_time datetime null comment '创建时间',
modify_id bigint null comment '更新人',
modify_time datetime null comment '更新时间',
deleted bit default false null comment '删除标记',
constraint traffic_airport_warn_info_pk
primary key (id)
)
comment '智慧机场-探测事件';
create index idx_traffic_flight_info_takeoff_time_index
on traffic_flight_info (takeoff_time);
create index idx_traffic_airport_warn_info_org_id_index
on traffic_airport_warn_info (org_id);
create index idx_traffic_airport_warn_info_warn_time_index
on traffic_airport_warn_info (warn_time);
alter table traffic_airport_warn_info
add bts_code varchar(255) not null comment '基站编号' after warn_time;
create index idx_traffic_airport_warn_info_bts_code_index
on traffic_airport_warn_info (bts_code);
create index idx_traffic_airport_warn_info_runway_no_index
on traffic_airport_warn_info (runway_no);
alter table traffic_flight_info
modify takeoff_time timestamp not null default CURRENT_TIMESTAMP comment '起飞时间';
alter table traffic_flight_info
modify landing_time timestamp not null default CURRENT_TIMESTAMP comment '降落时间';
alter table traffic_flight_info
modify create_time timestamp null default CURRENT_TIMESTAMP comment '创建时间';
alter table traffic_flight_info
modify modify_time timestamp null default CURRENT_TIMESTAMP comment '修改时间';
alter table traffic_airport_warn_info
modify runway_no varchar(255) null comment '跑道编号';
ALTER TABLE `uav_industrial_portfolio`.`civil_military_bts_info`
MODIFY COLUMN `create_by` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人名称';
alter table traffic_airport_warn_info
add invader_id varchar(255) null comment '入侵物编号' after runway_no;
alter table
traffic_runway_info
modify
right_top_lat decimal(20, 7) null comment '右上纬度';
ALTER TABLE `uav_industrial_portfolio`.`civil_military_alarm`
ADD COLUMN `target_type` VARCHAR(32) NULL DEFAULT NULL COMMENT '探测到的目标类型' AFTER `radar_id`,
ADD COLUMN `is_del` BIT(1) NULL DEFAULT b'0' COMMENT '是否删除0未删除1删除' AFTER `update_by`;
ALTER TABLE `uav_industrial_portfolio`.`civil_military_detection_configure_info`
ADD COLUMN `configs` LONGTEXT CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_0900_ai_ci' NULL DEFAULT NULL COMMENT '个人所有配置' AFTER `ref_wgs_lng`;
CREATE TABLE IF NOT EXISTS `uav_industrial_portfolio`.`sense_data_sink_config` (
`id` BIGINT(20) NOT NULL COMMENT '主键id',
`code` VARCHAR(64) CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_bin' NOT NULL COMMENT '分发者编码',
`name` VARCHAR(64) CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_bin' NOT NULL COMMENT '分发者名称',
`type` INT(11) NULL DEFAULT NULL COMMENT '分发者类型',
`public_key` VARCHAR(4096) CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_bin' NULL DEFAULT NULL COMMENT '公钥',
`config` VARCHAR(4096) CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_bin' NULL DEFAULT NULL COMMENT '配置',
`is_delete` TINYINT(1) NULL DEFAULT NULL COMMENT '是否删除',
`upd_usr_id` VARCHAR(255) CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_bin' NULL DEFAULT NULL COMMENT '更新用户id',
`upd_date` TIMESTAMP NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY USING BTREE (`id`),
INDEX `idx_sense_code` USING BTREE (`code`) VISIBLE)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8mb4
COLLATE = utf8mb4_bin
ROW_FORMAT = DYNAMIC
COMMENT='SF adapter的分发配置表'
;
ALTER TABLE `civil_military_alarm`
DROP INDEX `idx_company_id_status` ,
ADD INDEX `idx_company_id_status_del` USING BTREE (`company_id`, `status`, `is_del`);
ALTER TABLE `uav_industrial_portfolio`.`civil_military_alarm`
DROP INDEX `idx_company_id_status_del` ,
ADD INDEX `idx_company_id_status_del_time` USING BTREE (`company_id`, `status`, `is_del`, `begin_time`) VISIBLE;
;
ALTER TABLE uav_industrial_portfolio.photoelectric_alarm
CHANGE camera_id camera_id VARCHAR(64) NULL COMMENT '摄像头ID';

View File

@@ -0,0 +1,138 @@
/*
SQLyog Ultimate v13.1.1 (64 bit)
MySQL - 8.0.34 : Database - uav_iot_dispatcher
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!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 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`uav_iot_dispatcher` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `uav_iot_dispatcher`;
/*Table structure for table `cmii_uav_perception_position_node` */
DROP TABLE IF EXISTS `cmii_uav_perception_position_node`;
CREATE TABLE `cmii_uav_perception_position_node` (
`id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
`task_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'cmii_uav_perception_task的主键id',
`latitude` double NOT NULL COMMENT '纬度',
`longitude` double NOT NULL COMMENT '经度',
`altitude` float NOT NULL COMMENT '海拔',
`height` float NOT NULL COMMENT '相对地面高度',
`speed_x` float NOT NULL COMMENT 'x轴方向速度',
`speed_y` float NOT NULL COMMENT 'y轴方向速度',
`speed_z` float NOT NULL COMMENT 'z轴方向速度',
`distance` float DEFAULT NULL COMMENT '传感源到目标距离',
`timestamp` datetime(6) NOT NULL COMMENT '该条记录创建的时间戳,精确到毫秒',
`data_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '感知数据的id',
`radar_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '仅针对5G-A感知作为感知源设备的id即雷达自己的id',
`device_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '摄像头跟踪的设备id即摄像头自己的id',
`company_id` int NOT NULL COMMENT '公司ID用于数据隔离',
PRIMARY KEY (`id`),
KEY `ix_cmii_uav_perception_position_node_data_id` (`data_id`),
KEY `ix_cmii_uav_perception_position_node_task_id` (`task_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
/*Table structure for table `cmii_uav_perception_task` */
DROP TABLE IF EXISTS `cmii_uav_perception_task`;
CREATE TABLE `cmii_uav_perception_task` (
`id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
`project_id` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '项目编号',
`group_id` varchar(96) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '该组(探测任务)的编号,非唯一的,可以重复',
`origin_topic` varchar(96) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '原始引导源',
`shared_topic` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '共享引导源',
`publish_topic` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'IoT设备通知主题',
`lifecycle_is_started` tinyint(1) NOT NULL COMMENT '任务是否开始',
`lifecycle_is_completed` tinyint(1) NOT NULL COMMENT '任务是否完成',
`lifecycle_created_time` datetime(6) NOT NULL COMMENT '任务创建时间',
`lifecycle_completed_time` datetime(6) DEFAULT NULL COMMENT '任务结束时间',
`lifecycle_max_lifetime` int NOT NULL COMMENT '任务最大存活时间(单位秒)',
`device_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '当前摄像头跟踪的设备id即摄像头自己的id',
`company_id` int NOT NULL COMMENT '公司ID用于数据隔离',
PRIMARY KEY (`id`),
KEY `ix_cmii_uav_perception_task_group_id` (`group_id`),
KEY `ix_cmii_uav_perception_task_lifecycle_is_completed` (`lifecycle_is_completed`),
KEY `ix_cmii_uav_perception_task_lifecycle_is_started` (`lifecycle_is_started`),
KEY `ix_cmii_uav_perception_task_project_id` (`project_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
/*Table structure for table `cmii_uav_servo_device` */
DROP TABLE IF EXISTS `cmii_uav_servo_device`;
CREATE TABLE `cmii_uav_servo_device` (
`id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '主键id',
`camera_name` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '摄像头的名字',
`camera_device_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '摄像头的设备id',
`camera_project_id` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '摄像头的项目所属id',
`camera_ip` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '摄像头的ip',
`camera_port` int NOT NULL COMMENT '摄像头的port',
`camera_rtsp_port` int NOT NULL COMMENT '摄像头rtsp推流端口',
`onvif_user` varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'onvif连接摄像头的用户名',
`onvif_passwd` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'onvif连接摄像头的密码',
`camera_pan_range_min` float NOT NULL COMMENT '摄像头的水平最小度数',
`camera_pan_range_max` float NOT NULL COMMENT '摄像头的水平最大度数',
`camera_tilt_range_min` float NOT NULL COMMENT '摄像头的垂直最小度数',
`camera_tilt_range_max` float NOT NULL COMMENT '摄像头的垂直最大度数',
`camera_pan_speed_min` float NOT NULL COMMENT '摄像头的水平最小速度',
`camera_pan_speed_max` float NOT NULL COMMENT '摄像头的水平最大速度',
`camera_tilt_speed_min` float NOT NULL COMMENT '摄像头的垂直最小速度',
`camera_tilt_speed_max` float NOT NULL COMMENT '摄像头的垂直最大速度',
`camera_zoom_range_min` float NOT NULL COMMENT '摄像头的变焦最小倍数',
`camera_zoom_range_max` float NOT NULL COMMENT '摄像头的变焦最大倍数',
`dist_min` float NOT NULL COMMENT '摄像头观测目标的最小距离',
`dist_max` float NOT NULL COMMENT '摄像头观测目标的最大距离',
`dist_min_zoom_index` float NOT NULL COMMENT '摄像头的最小变焦步长',
`dist_max_zoom_index` float NOT NULL COMMENT '摄像头的最大变焦步长',
`zoom_coeff` float NOT NULL COMMENT '摄像头的变焦系数',
`camera_latitude` double DEFAULT NULL COMMENT '摄像头所在的纬度',
`camera_longitude` double DEFAULT NULL COMMENT '摄像头所在的经度',
`camera_altitude` float DEFAULT NULL COMMENT '摄像头所在的海拔',
`camera_height` float DEFAULT NULL COMMENT '摄像头所在的高度(相对地面高度)',
`camera_delay` float NOT NULL COMMENT '摄像头延迟',
`camera_zoom_method` float NOT NULL COMMENT '触发变焦的方式默认为1',
`camera_pan_trime` float NOT NULL COMMENT '摄像头的水平偏差度',
`camera_tilt_trime` float NOT NULL COMMENT '摄像头的垂直偏差度',
`camera_reverse` float NOT NULL COMMENT '摄像头是否反转,默认不反转',
`camera_hfov` float NOT NULL COMMENT '摄像头的水平视场角',
`camera_vfov` float NOT NULL COMMENT '摄像头的垂直视场角',
`camera_focal_len_min` float NOT NULL COMMENT '摄像头最小焦距',
`camera_focal_len_max` float NOT NULL COMMENT '摄像头最大焦距',
`mqtt_username` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '摄像头连接mqtt的账号名',
`mqtt_password` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '摄像头连接mqtt的密码',
`mqtt_host` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '摄像头连接mqtt的地址',
`mqtt_port` int NOT NULL COMMENT '摄像头连接mqtt的端口',
`mqtt_keep_alive_interval` int NOT NULL COMMENT '会话心跳时间,单位为秒',
`mqtt_qos` int NOT NULL COMMENT '服务质量,0代表“至多一次”',
`dispatcher_topic` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '下发到边端设备的topic',
`reporting_topic` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '边端设备上传回来的topic',
`auto_cam_connect` tinyint(1) NOT NULL COMMENT '任务是否开始',
`auto_push_stream` tinyint(1) NOT NULL COMMENT '任务是否开始',
`media_push_stream` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '摄像头的推流地址',
`media_pull_stream` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '前端的拉流地址',
`media_ai_pull_stream` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '前端的AI流拉流地址',
`created_at` datetime(6) DEFAULT NULL COMMENT '记录创建时间',
`updated_at` datetime(6) DEFAULT NULL COMMENT '记录更新时间',
`company_id` int NOT NULL COMMENT '公司ID用于数据隔离',
`user_id` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '用户ID用于数据隔离',
PRIMARY KEY (`id`),
UNIQUE KEY `ix_cmii_uav_servo_device_camera_device_id` (`camera_device_id`),
KEY `ix_cmii_uav_servo_device_media_ai_pull_stream` (`media_ai_pull_stream`),
KEY `ix_cmii_uav_servo_device_media_pull_stream` (`media_pull_stream`),
KEY `ix_cmii_uav_servo_device_media_push_stream` (`media_push_stream`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

View File

@@ -0,0 +1,6 @@
create database if not exists uav_waypoint DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
use uav_waypoint;
ALTER TABLE `uav_waypoint`.`air_line_info`
MODIFY COLUMN `flyer_name` varchar(50) DEFAULT NULL COMMENT '飞手姓名';
ALTER TABLE `uav_waypoint`.`air_line_info`
MODIFY COLUMN `flyer_name` varchar(128) DEFAULT NULL COMMENT '飞手姓名';

View File

@@ -0,0 +1,12 @@
#!/bin/bash
NEW_UPDATED_SQL_FILE_FOLDER=/root/update_5.4.0_5.8.0
for sql_file in $(ls ${NEW_UPDATED_SQL_FILE_FOLDER} |sort -n -k1.1,1.2); do
echo "current file is $NEW_UPDATED_SQL_FILE_FOLDER/${sql_file}"
/root/mysql-8.0.27-linux-glibc2.17-x86_64-minimal/bin/mysql -uroot -pQzfXQhd3bQ -h127.0.0.1 -P33306 <"$NEW_UPDATED_SQL_FILE_FOLDER/${sql_file}"
echo "------------------"
echo ""
done
/root/mysql-8.0.27-linux-glibc2.17-x86_64-minimal/bin/mysql -uroot -pQzfXQhd3bQ -h127.0.0.1 -P33306