Files
backend_v2/db/migrations/2026-09-27-01-add-runway-published-at.sql
toom1996 d15d2a4701 update
2026-09-28 10:52:50 +08:00

13 lines
851 B
SQL
Raw Permalink 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.

-- 新增走秀发布日期列 published_at:从 Vogue 详情页 application/ld+json 的 datePublished 抽取,
-- 以 Unix 时间戳(秒,bigint)存储,0 表示未抽取/未知,与 created_at / updated_at 的约定一致。
--
-- 用途:
-- 1) 作为走秀的权威发布时间存下来(替代 created_at/updated_at 这类入库时间)。
-- 2) 标题缺年份(year=0、season_code 为空)的秀,用发布日期的年份补全 year / season_code,
-- 使这些秀重新可被「按年份/季节筛选」与热门排序(按 year + season_code)命中。
--
-- 回填为一次性操作:重跑 spider vogue 时,已存在实体走跳过分支按主键 id 写回 published_at
-- (及缺失年份),不重下图片。
ALTER TABLE brand_runways
ADD COLUMN IF NOT EXISTS published_at bigint NOT NULL DEFAULT 0;