Files
backend_v2/db/migrations/2026-09-30-03-street-snap-title-cn.sql
toom1996 1b06bd5bda update
2026-09-30 11:58:32 +08:00

7 lines
570 B
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.

-- 确保 street_snaps 存在 title_cn 列(中英文标题并存:title 作英文源,title_cn 供后台翻译/前端 locale)。
--
-- 该列本应在 2026-09-22-01 单表发布迁移里通过 ADD COLUMN IF NOT EXISTS 加上,但部分从更早 dump
-- 恢复的库漏跑了这条,导致 street_snaps 缺列、街拍落库写 title_cn 时报「列不存在」。
-- 这里用 IF NOT EXISTS 幂等补齐;已存在的库执行本文件直接跳过,无副作用。
ALTER TABLE IF EXISTS street_snaps ADD COLUMN IF NOT EXISTS title_cn text NOT NULL DEFAULT '';