b31d8d0096
- 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.
40 lines
1.6 KiB
SQL
40 lines
1.6 KiB
SQL
UPDATE article_templates
|
|
SET card_config_json = jsonb_set(
|
|
jsonb_set(
|
|
jsonb_set(
|
|
jsonb_set(
|
|
jsonb_set(
|
|
card_config_json #- '{wizard,derived_inputs}' #- '{wizard,outline,custom_max_length}',
|
|
'{wizard,steps,basic,description}',
|
|
to_jsonb('研究主题、品牌与背景上下文'::text),
|
|
true
|
|
),
|
|
'{wizard,basic,cards,template_fields}',
|
|
'{"title": "模板字段", "hint": "填写研究主题和深度要求,帮助 AI 控制报告范围。"}'::jsonb,
|
|
true
|
|
),
|
|
'{wizard,basic,cards,competitors}',
|
|
'{"title": "参考对象", "hint": "可补充相关品牌、机构或竞品,帮助报告更有参照系。"}'::jsonb,
|
|
true
|
|
),
|
|
'{wizard,outline,custom_placeholder}',
|
|
to_jsonb('补充一个额外结构,例如"行动建议"'::text),
|
|
true
|
|
),
|
|
'{wizard,outline,sections}',
|
|
'[
|
|
{ "key": "summary", "label": "摘要", "default": true },
|
|
{ "key": "background", "label": "研究背景", "default": true },
|
|
{ "key": "findings", "label": "关键发现", "default": true },
|
|
{ "key": "market_view", "label": "市场判断", "default": false },
|
|
{ "key": "risks", "label": "风险与挑战", "default": false },
|
|
{ "key": "action_items", "label": "行动建议", "default": false },
|
|
{ "key": "conclusion", "label": "结论", "default": false }
|
|
]'::jsonb,
|
|
true
|
|
),
|
|
updated_at = NOW()
|
|
WHERE scope = 'platform'
|
|
AND template_key = 'research_report'
|
|
AND deleted_at IS NULL;
|