抖音 profile/other 响应本就携带画像数据但被丢弃,同步链路也无回填。 - migration 1046: creator_competitor 增加 signature、total_favorited 列及非负约束 - douyin 解析层: TargetProfile 增加签名与计数,total_favorited 兼容字符串大数 - store: UpdateCompetitorProfile 改为画像回填(nil 计数保留原值) - 同步链路: 作品采集成功后拉取 profile 回填,失败仅记日志不阻断
14 lines
601 B
SQL
14 lines
601 B
SQL
-- 监控账号画像补全:作者介绍与获赞总数(同步时经抖音 profile/other 接口回填)。
|
|
|
|
ALTER TABLE creator_competitor
|
|
ADD COLUMN IF NOT EXISTS signature text NOT NULL DEFAULT '',
|
|
ADD COLUMN IF NOT EXISTS total_favorited bigint;
|
|
|
|
ALTER TABLE creator_competitor
|
|
ADD CONSTRAINT creator_competitor_counts_non_negative CHECK (
|
|
(follower_count IS NULL OR follower_count >= 0)
|
|
AND (following_count IS NULL OR following_count >= 0)
|
|
AND (total_favorited IS NULL OR total_favorited >= 0)
|
|
AND (aweme_count IS NULL OR aweme_count >= 0)
|
|
);
|