-- 历史数据：列表封面与创作页对齐，用首页插画（page_no=1）回填 cover_url
UPDATE t_ugc_work w
INNER JOIN t_ugc_work_page p ON p.work_id = w.id AND p.page_no = 1
SET w.cover_url = p.image_url,
    w.modify_time = NOW()
WHERE w.is_deleted = 0
  AND p.image_url IS NOT NULL
  AND TRIM(p.image_url) <> '';
