设备bug修改 新增设备解绑功能
This commit is contained in:
@@ -10,7 +10,6 @@ CREATE TABLE app_device_binding (
|
||||
device_name_snapshot varchar(255) NULL COMMENT '列表显示名称快照',
|
||||
unbound_time datetime NULL COMMENT '解绑完成时间',
|
||||
unbind_source varchar(16) NULL COMMENT 'DEVICE/APP/ADMIN',
|
||||
unbind_command_id varchar(64) NULL COMMENT '触发解绑的命令编号',
|
||||
cleanup_attempts int NOT NULL DEFAULT 0 COMMENT '清理尝试次数',
|
||||
cleanup_error varchar(500) NULL COMMENT '最近清理错误',
|
||||
create_dept bigint NULL,
|
||||
@@ -32,8 +31,7 @@ CREATE TABLE app_device_binding (
|
||||
CREATE TABLE app_device_unbind_command (
|
||||
id bigint NOT NULL,
|
||||
device_no varchar(64) NOT NULL COMMENT '设备编号',
|
||||
command_id varchar(64) NOT NULL COMMENT '设备解绑命令编号',
|
||||
binding_id varchar(64) NOT NULL COMMENT '命令目标绑定标识',
|
||||
binding_id varchar(64) NOT NULL COMMENT '解绑目标绑定标识',
|
||||
command_status varchar(16) NOT NULL COMMENT 'PROCESSING/APPLIED/STALE/FAILED',
|
||||
message varchar(500) NULL COMMENT '处理结果',
|
||||
attempt_count int NOT NULL DEFAULT 0 COMMENT '处理次数',
|
||||
@@ -44,9 +42,8 @@ CREATE TABLE app_device_unbind_command (
|
||||
update_by bigint NULL,
|
||||
update_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE KEY uk_app_device_unbind_command (device_no, command_id),
|
||||
KEY idx_app_device_unbind_binding (device_no, binding_id)
|
||||
) COMMENT='设备解绑命令处理记录';
|
||||
UNIQUE KEY uk_app_device_unbind_binding (device_no, binding_id)
|
||||
) COMMENT='设备解绑处理记录';
|
||||
|
||||
-- Existing bindings must re-establish the device-side bindingId before becoming ACTIVE.
|
||||
INSERT INTO app_device_binding (
|
||||
|
||||
Reference in New Issue
Block a user