bmc_hub/migrations/137_add_priority_to_sag.sql
Christian bef5c20c83 feat: Implement AI-powered Case Analysis Service and QuickCreate Modal
- Added CaseAnalysisService for analyzing case text using Ollama LLM.
- Integrated AI analysis into the QuickCreate modal for automatic case creation.
- Created HTML structure for QuickCreate modal with dynamic fields for title, description, customer, priority, technician, and tags.
- Implemented customer search functionality with debounce for efficient querying.
- Added priority field to sag_sager table with migration for consistency in case management.
- Introduced caching mechanism in CaseAnalysisService to optimize repeated analyses.
- Enhanced error handling and user feedback in the QuickCreate modal.
2026-02-20 07:10:06 +01:00

20 lines
642 B
SQL

-- Migration 137: Add priority field to SAG module
-- Matches TTicket priority system for consistency
-- Create priority enum type
DO $$ BEGIN
CREATE TYPE sag_priority AS ENUM ('low', 'normal', 'high', 'urgent');
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
-- Add priority column to sag_sager
ALTER TABLE sag_sager
ADD COLUMN IF NOT EXISTS priority sag_priority DEFAULT 'normal';
-- Add index for filtering by priority
CREATE INDEX IF NOT EXISTS idx_sag_priority ON sag_sager(priority);
-- Add comment for documentation
COMMENT ON COLUMN sag_sager.priority IS 'Case priority level: low, normal (default), high, urgent';