datai/datai-scenes/datai-scene-salesforce/docs/sql/create-realtime-sync-log-table.sql
Kris 517284b614 feat: 实现Salesforce Pub/Sub API实时数据同步
主要变更:
- 新增PubSubConnectionFactory连接工厂,提供Pub/Sub API连接管理
- 新增PubSubEventSubscriberImpl实现,支持Pub/Sub API事件订阅
- 更新EventProcessorImpl,添加事件批次处理能力
- 更新RealtimeSyncService,使用Pub/Sub API替代CDC实现
- 更新Authentication.canvas架构文档,添加Pub/Sub组件
- 优化同步配置管理和实时同步日志功能

技术改进:
- 提升实时同步性能和可靠性
- 支持批量事件处理,提高吞吐量
- 完善连接工厂模式,统一管理连接生命周期
2026-01-12 10:31:25 +08:00

24 lines
1.2 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- 创建实时同步日志表
CREATE TABLE IF NOT EXISTS `datai_integration_realtime_sync_log` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`object_name` varchar(255) NOT NULL COMMENT '对象名称',
`record_id` varchar(255) NOT NULL COMMENT '记录ID',
`operation_type` varchar(50) NOT NULL COMMENT '操作类型 (INSERT/UPDATE/DELETE)',
`change_data` json NOT NULL COMMENT '变更数据',
`sync_status` varchar(50) NOT NULL COMMENT '同步状态 (SUCCESS/FAILED/PENDING)',
`error_message` text COMMENT '错误信息',
`retry_count` int(11) DEFAULT '0' COMMENT '重试次数',
`salesforce_timestamp` datetime COMMENT 'Salesforce时间戳',
`sync_timestamp` datetime NOT NULL COMMENT '同步时间戳',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_object_name` (`object_name`),
KEY `idx_record_id` (`record_id`),
KEY `idx_sync_status` (`sync_status`),
KEY `idx_sync_timestamp` (`sync_timestamp`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='实时同步日志表';
-- 添加注释
ALTER TABLE `datai_integration_realtime_sync_log` COMMENT='实时同步日志表记录Salesforce CDC同步操作的详细信息';