fix(saas): migration idempotency fixes + SCHEMA_VERSION bump to 14
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
- Add IF NOT EXISTS to accounts_template_assignment ALTER COLUMN - Add IF NOT EXISTS to webhooks CREATE INDEX statements - Add created_at/updated_at columns + ON CONFLICT DO NOTHING to industry templates - Bump SCHEMA_VERSION 13→14 to force migration re-run on existing DB
This commit is contained in:
@@ -10,7 +10,8 @@ INSERT INTO agent_templates (
|
||||
model, system_prompt, tools, capabilities, temperature, max_tokens,
|
||||
visibility, status, current_version,
|
||||
soul_content, scenarios, welcome_message, quick_commands,
|
||||
personality, communication_style, source_id, version
|
||||
personality, communication_style, source_id, version,
|
||||
created_at, updated_at
|
||||
) VALUES (
|
||||
'edu-teacher-001',
|
||||
'教学助手',
|
||||
@@ -55,8 +56,9 @@ INSERT INTO agent_templates (
|
||||
'friendly',
|
||||
'温暖、耐心、善于用易懂的语言解释复杂概念',
|
||||
'education-teacher',
|
||||
1
|
||||
);
|
||||
1,
|
||||
NOW(), NOW()
|
||||
) ON CONFLICT (id) DO NOTHING;
|
||||
|
||||
-- ============================================================
|
||||
-- 2. Healthcare — 医疗行政助手
|
||||
@@ -66,7 +68,8 @@ INSERT INTO agent_templates (
|
||||
model, system_prompt, tools, capabilities, temperature, max_tokens,
|
||||
visibility, status, current_version,
|
||||
soul_content, scenarios, welcome_message, quick_commands,
|
||||
personality, communication_style, source_id, version
|
||||
personality, communication_style, source_id, version,
|
||||
created_at, updated_at
|
||||
) VALUES (
|
||||
'healthcare-admin-001',
|
||||
'医疗行政助手',
|
||||
@@ -111,8 +114,9 @@ INSERT INTO agent_templates (
|
||||
'professional',
|
||||
'专业、准确、注重细节,提供技术深度和可操作建议',
|
||||
'healthcare-admin',
|
||||
1
|
||||
);
|
||||
1,
|
||||
NOW(), NOW()
|
||||
) ON CONFLICT (id) DO NOTHING;
|
||||
|
||||
-- ============================================================
|
||||
-- 3. Design (Shantou) — 设计助手
|
||||
@@ -122,7 +126,8 @@ INSERT INTO agent_templates (
|
||||
model, system_prompt, tools, capabilities, temperature, max_tokens,
|
||||
visibility, status, current_version,
|
||||
soul_content, scenarios, welcome_message, quick_commands,
|
||||
personality, communication_style, source_id, version
|
||||
personality, communication_style, source_id, version,
|
||||
created_at, updated_at
|
||||
) VALUES (
|
||||
'design-shantou-001',
|
||||
'设计助手',
|
||||
@@ -167,5 +172,6 @@ INSERT INTO agent_templates (
|
||||
'creative',
|
||||
'富有创意、思维开放,鼓励探索新想法和解决方案',
|
||||
'design-shantou',
|
||||
1
|
||||
);
|
||||
1,
|
||||
NOW(), NOW()
|
||||
) ON CONFLICT (id) DO NOTHING;
|
||||
|
||||
Reference in New Issue
Block a user