CREATE TABLE `data_push_file_message` (
`id` bigint(20) NOT NULL,
`even_json` text COMMENT 'json',
`deal_flag` tinyint(1) unsigned DEFAULT '0' COMMENT '1已处理0未处理',
`create_at` bigint(20) DEFAULT NULL COMMENT '创建时间',
`update_at` bigint(20) DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
ALTER TABLE `data_center`.`data_push_file_message`
    ADD COLUMN `file_name` varchar(255) NULL COMMENT '文件名称' AFTER `even_json`;





ALTER TABLE `data_alarm_push`
    ADD COLUMN `popup_type` tinyint(1) NULL COMMENT '弹窗方式：1：手动关闭 2：自动关闭' AFTER `push_type_name`,
ADD COLUMN `popup_audio` varchar(255) NULL COMMENT '弹窗音频地址' AFTER `popup_type`;

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for data_device_alarm_rel
-- ----------------------------
CREATE TABLE `data_device_alarm_rel`  (
                                          `id` bigint(20) NOT NULL COMMENT 'id',
                                          `device_id` bigint(20) NULL DEFAULT NULL COMMENT '设备id',
                                          `device_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备名称',
                                          `alarm_time` datetime(0) NULL DEFAULT NULL COMMENT '告警时间',
                                          `status` tinyint(1) NULL DEFAULT NULL COMMENT '状态 0:未处理;1:已处理',
                                          `alarm_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '告警键值',
                                          `alarm_value` double NULL DEFAULT NULL COMMENT '告警数据',
                                          `alarm_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '告警名称',
                                          `handle_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '处理人',
                                          `handle_time` datetime(0) NULL DEFAULT NULL COMMENT '处理时间',
                                          `handle_remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '处理备注',
                                          `application_ids` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '应用ids',
                                          `tenant_id` bigint(20) NULL DEFAULT NULL COMMENT '租户id',
                                          `create_at` bigint(20) NULL DEFAULT NULL,
                                          `update_at` bigint(20) NULL DEFAULT NULL,
                                          PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '预警广播设备告警数据表' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;



-- create table `dev_cloud_231116_bak`.dev_info as select * from dev_cloud.dev_info;
-- create table `dev_cloud_231116_bak`.dev_product_command_pannel_conf as select * from dev_cloud.dev_product_command_pannel_conf;
-- create table `dev_cloud_231116_bak`.dev_protocol as select * from dev_cloud.dev_protocol;
-- create table `dev_cloud_231116_bak`.dev_protocol_version as select * from dev_cloud.dev_protocol_version;
-- create table `dev_cloud_231116_bak`.dev_template as select * from dev_cloud.dev_template;
-- create table `dev_cloud_231116_bak`.dev_template_command_pannel_conf as select * from dev_cloud.dev_template_command_pannel_conf;
-- create table `dev_cloud_231116_bak`.dev_template_factor_conf_release as select * from dev_cloud.dev_template_factor_conf_release;
-- create table `dev_cloud_231116_bak`.dev_template_factor_conf_snap as select * from dev_cloud.dev_template_factor_conf_snap;