feat(kol): add kol_prompt_id column to articles

This commit is contained in:
2026-04-17 08:06:36 +08:00
parent fd74ad703b
commit 5c8f2bffae
2 changed files with 8 additions and 0 deletions
@@ -0,0 +1,2 @@
DROP INDEX IF EXISTS idx_article_kol_prompt;
ALTER TABLE articles DROP COLUMN IF EXISTS kol_prompt_id;
@@ -0,0 +1,6 @@
ALTER TABLE articles
ADD COLUMN kol_prompt_id BIGINT REFERENCES kol_prompts(id);
CREATE INDEX idx_article_kol_prompt
ON articles(kol_prompt_id)
WHERE kol_prompt_id IS NOT NULL AND deleted_at IS NULL;