feat(migration): add cover_image column to posts table
This commit is contained in:
parent
f3c1718cd0
commit
cf783d8f6e
5
migrations/003_post_cover_image.sql
Normal file
5
migrations/003_post_cover_image.sql
Normal 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;
|
||||||
Loading…
x
Reference in New Issue
Block a user