feat(migrations): Harden task audit tracking and optimize article templates

- Added migration to harden task audit tracking by modifying audit_logs and related tables.
- Introduced operator_id to several tables for better tracking of actions.
- Updated article_templates with new prompt templates for various article types, enhancing content generation.
- Created prompt_rules and schedule_tasks tables to manage content generation rules and scheduling.
- Added foreign key constraints to articles for better data integrity.
This commit is contained in:
2026-04-02 00:31:28 +08:00
parent de30497f59
commit b31d8d0096
101 changed files with 16671 additions and 721 deletions
@@ -0,0 +1,65 @@
UPDATE article_templates
SET prompt_template = $${{topic}} Markdown
:
1. {{count}}
2.
:
-
- competitors
-
- $$,
updated_at = NOW()
WHERE scope = 'platform'
AND template_key = 'top_x_article'
AND deleted_at IS NULL;
UPDATE article_templates
SET prompt_template = $${{product_name}}{{category}} Markdown
:
1.
2. 使
:
- review_intro_hook
- 使
-
-
- 稿$$,
updated_at = NOW()
WHERE scope = 'platform'
AND template_key = 'product_review'
AND deleted_at IS NULL;
UPDATE article_templates
SET prompt_template = $${{subject}} Markdown
:
1.
2.
:
- depth = overview depth = detailed
-
-
- $$,
updated_at = NOW()
WHERE scope = 'platform'
AND template_key = 'research_report'
AND deleted_at IS NULL;
UPDATE article_templates
SET prompt_template = $${{brand}} {{keyword}} Markdown
:
1.
2. /
:
-
-
-
-
- $$,
updated_at = NOW()
WHERE scope = 'platform'
AND template_key = 'brand_search_expansion'
AND deleted_at IS NULL;