修改API采集,和离线采集的 bug

这个提交包含在:
apple
2026-12-02 16:42:55 +08:00
父节点 bd87d49778
当前提交 b49578022b
共修改 70 个文件,包含 1581 行新增和 45 行删除
+40 -1
查看文件
@@ -1,5 +1,5 @@
-- Fresh-install DM schema; target 8.4.4.80 Pack89.
-- Source fingerprint: d8933a8e96162fc66fca00c60ae5c0846d5af745a3cf8e4ad787dea89ce4a903
-- Source fingerprint: 97402abfb36c6df25ab27f7e616fe279d2d9d55ca0bf1527d365e8203a0618b0
-- @statement sys_social
CREATE TABLE sys_social (
id bigint not null comment '主键',
@@ -20638,3 +20638,42 @@ CREATE TABLE ing_api_poll_profile (
profile_json CLOB NOT NULL,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);
-- @statement ing_api_poll_state
CREATE TABLE ing_api_poll_state (
intake_id BIGINT PRIMARY KEY,
org_scope_id BIGINT NOT NULL,
actor_id BIGINT NOT NULL,
enabled INT DEFAULT 0 NOT NULL,
watermark VARCHAR(64 CHAR),
next_due_at TIMESTAMP NULL,
lease_id VARCHAR(64 CHAR),
lease_until TIMESTAMP NULL,
last_status VARCHAR(32 CHAR) DEFAULT 'NEVER' NOT NULL,
last_error_code VARCHAR(128 CHAR),
last_written_rows INT DEFAULT 0 NOT NULL,
last_run_at TIMESTAMP NULL,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL
);
-- @statement ing_api_poll_state
CREATE INDEX idx_api_poll_due ON ing_api_poll_state(enabled, next_due_at);
-- @statement ing_api_poll_run
CREATE TABLE ing_api_poll_run (
run_id BIGINT PRIMARY KEY,
intake_id BIGINT NOT NULL,
org_scope_id BIGINT NOT NULL,
actor_id BIGINT NOT NULL,
trigger_type VARCHAR(32 CHAR) NOT NULL,
run_status VARCHAR(32 CHAR) NOT NULL,
written_rows INT DEFAULT 0 NOT NULL,
error_code VARCHAR(128 CHAR),
watermark_before VARCHAR(64 CHAR),
watermark_after VARCHAR(64 CHAR),
started_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
completed_at TIMESTAMP NULL
);
-- @statement ing_api_poll_run
CREATE INDEX idx_api_poll_run_intake ON ing_api_poll_run(org_scope_id, intake_id, started_at);