chore(init): 初始化解忧商行项目并完成 Phase 0 基座
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
-- +goose Up
|
||||
|
||||
-- 弹窗公告:前台首页进入时弹一次、必须用户手动关闭的公告。
|
||||
-- is_popup = 1 且 status = published 时,才会进入弹窗候选;
|
||||
-- 多条同时生效时前台只弹「优先级最高」的一条(priority DESC, published_at DESC, id DESC)。
|
||||
-- 前台按「每天一次」记录已关闭状态,因此这里只标记类型,不做送达记录。
|
||||
ALTER TABLE announcements
|
||||
ADD COLUMN is_popup TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否弹窗公告: 0否, 1是' AFTER is_important,
|
||||
ADD KEY idx_announcements_popup (is_popup, status, distribution_site_id, priority);
|
||||
|
||||
-- +goose Down
|
||||
|
||||
ALTER TABLE announcements
|
||||
DROP KEY idx_announcements_popup,
|
||||
DROP COLUMN is_popup;
|
||||
Reference in New Issue
Block a user