Update schema.sql

This commit is contained in:
fcarraUniSa
2026-02-17 14:24:54 +01:00
committed by GitHub
parent ab5cf6752f
commit f2e6dc6184

View File

@@ -82,6 +82,7 @@ CREATE TABLE ticket_messages (
ticket_id VARCHAR(36) NOT NULL, ticket_id VARCHAR(36) NOT NULL,
role ENUM('user', 'assistant', 'system') NOT NULL, role ENUM('user', 'assistant', 'system') NOT NULL,
content TEXT, content TEXT,
attachments JSON DEFAULT NULL,
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP, timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (ticket_id) REFERENCES tickets(id) ON DELETE CASCADE FOREIGN KEY (ticket_id) REFERENCES tickets(id) ON DELETE CASCADE
); );
@@ -145,7 +146,7 @@ INSERT INTO settings (id, branding, smtp, email_templates, features, ai_config)
'{"appName": "OmniSupport AI", "primaryColor": "#0284c7", "logoUrl": "https://via.placeholder.com/150"}', '{"appName": "OmniSupport AI", "primaryColor": "#0284c7", "logoUrl": "https://via.placeholder.com/150"}',
'{"host": "smtp.example.com", "port": 587, "user": "notifications@omnisupport.ai", "pass": "password", "secure": true, "fromEmail": "noreply@omnisupport.ai"}', '{"host": "smtp.example.com", "port": 587, "user": "notifications@omnisupport.ai", "pass": "password", "secure": true, "fromEmail": "noreply@omnisupport.ai"}',
'[{"id": "t1", "name": "Conferma Apertura Ticket", "trigger": "ticket_created", "audience": "client", "subject": "Ticket #{ticket_id} Creato", "body": "Grazie per averci contattato.", "isActive": true}]', '[{"id": "t1", "name": "Conferma Apertura Ticket", "trigger": "ticket_created", "audience": "client", "subject": "Ticket #{ticket_id} Creato", "body": "Grazie per averci contattato.", "isActive": true}]',
'{"kbEnabled": true, "maxKbArticles": 50, "maxSupervisors": 2, "aiKnowledgeAgentEnabled": true, "maxAiGeneratedArticles": 10, "maxAgents": 10}', '{"kbEnabled": true, "maxKbArticles": 50, "maxSupervisors": 2, "aiKnowledgeAgentEnabled": true, "maxAiGeneratedArticles": 10, "maxAgents": 10, "attachmentsEnabled": true, "maxFileSizeMb": 5, "allowedFileTypes": "jpg,png,pdf,docx"}',
'{"provider": "gemini", "apiKey": "", "model": "gemini-3-flash-preview", "isActive": true, "agentName": "OmniSupport AI", "customPrompt": ""}' '{"provider": "gemini", "apiKey": "", "model": "gemini-3-flash-preview", "isActive": true, "agentName": "OmniSupport AI", "customPrompt": ""}'
); );