云
13 小时以前 95ae0c83d2aa58d86b4039e3f7f16ee93afb8f00
sql/mysql/agent_import_command_20261022.sql
@@ -5,7 +5,6 @@
  `idempotency_key` varchar(128) NOT NULL COMMENT '幂等键',
  `request_digest` char(64) NOT NULL COMMENT '请求摘要 SHA-256',
  `module_id` varchar(64) NOT NULL COMMENT '业务模块 ID,如 srm.supplier',
  `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_generic_command` (`tenant_id`, `owner_user_id`, `module_id`, `command_id`),
  UNIQUE KEY `uk_agent_import_generic_idempotency` (`tenant_id`, `owner_user_id`, `module_id`, `idempotency_key`),
  KEY `idx_agent_import_generic_module` (`tenant_id`, `module_id`, `create_time`)
  UNIQUE KEY `uk_agent_import_generic_command` (`owner_user_id`, `module_id`, `command_id`),
  UNIQUE KEY `uk_agent_import_generic_idempotency` (`owner_user_id`, `module_id`, `idempotency_key`),
  KEY `idx_agent_import_generic_module` (`module_id`, `create_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='智能体通用业务导入命令';
CREATE TABLE IF NOT EXISTS `agent_import_command_row` (