云
10 小时以前 95ae0c83d2aa58d86b4039e3f7f16ee93afb8f00
sql/mysql/mdm_agent_import_command_20261022.sql
@@ -4,7 +4,6 @@
  `command_id` varchar(64) NOT NULL COMMENT '智能体提交命令 ID(幂等)',
  `idempotency_key` varchar(128) NOT NULL COMMENT '幂等键',
  `request_digest` char(64) NOT NULL COMMENT '请求摘要 SHA-256',
  `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户 ID',
  `owner_user_id` bigint NOT NULL COMMENT '提交用户 ID',
  `session_id` bigint DEFAULT NULL COMMENT '补录会话 ID',
  `attachment_id` bigint NOT NULL COMMENT '附件 ID',
@@ -26,9 +25,9 @@
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `deleted` bit(1) NOT NULL DEFAULT b'0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_agent_import_command` (`tenant_id`, `owner_user_id`, `command_id`),
  UNIQUE KEY `uk_agent_import_idempotency` (`tenant_id`, `owner_user_id`, `idempotency_key`),
  KEY `idx_agent_import_command_session` (`tenant_id`, `session_id`, `create_time`)
  UNIQUE KEY `uk_agent_import_command` (`owner_user_id`, `command_id`),
  UNIQUE KEY `uk_agent_import_idempotency` (`owner_user_id`, `idempotency_key`),
  KEY `idx_agent_import_command_session` (`session_id`, `create_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='智能体物料导入命令';
CREATE TABLE IF NOT EXISTS `mdm_agent_import_command_row` (