更新docker构建cd (#10)

* update github actions

* update github actions

* update github actions

* update github actions

* update github actions

* update github actions

* update github actions

---------

Co-authored-by: Kevin <kevin@brighteng.org>
This commit is contained in:
Sully
2026-03-13 23:41:56 +08:00
committed by GitHub
parent 55b342b623
commit 9636c059d0
5 changed files with 89 additions and 45 deletions

View File

@@ -14,6 +14,22 @@ CREATE TABLE IF NOT EXISTS chapter_sections (
CREATE INDEX IF NOT EXISTS ix_chapter_sections_chapter_id ON chapter_sections(chapter_id);
CREATE INDEX IF NOT EXISTS ix_chapter_sections_order ON chapter_sections(chapter_id, order_index);
-- 若 chapter_sections 已存在且已提前切换到 image_id 结构,重跑迁移时需要临时补回 image 列,
-- 以便后续 Python 脚本先完成 JSON -> memoir_images 的数据搬迁。
DO $$
BEGIN
IF NOT EXISTS (
SELECT 1
FROM information_schema.columns
WHERE table_schema = 'public'
AND table_name = 'chapter_sections'
AND column_name = 'image'
) THEN
ALTER TABLE chapter_sections ADD COLUMN image JSONB;
RAISE NOTICE '已补回 chapter_sections.image供数据迁移使用';
END IF;
END $$;
-- ========== 2. chapters 表增加 cover_image ==========
DO $$
BEGIN