feat(migration): add cover_image column to posts table

This commit is contained in:
xfy 2026-06-02 18:12:45 +08:00
parent f3c1718cd0
commit cf783d8f6e

View File

@ -0,0 +1,5 @@
-- 新增封面图字段
ALTER TABLE posts ADD COLUMN cover_image VARCHAR(500);
-- 为封面图添加索引
CREATE INDEX idx_posts_cover ON posts(cover_image) WHERE cover_image IS NOT NULL;