- Created tables for AI benchmark runs and results to facilitate model evaluation. - Added expected answers column to benchmark results. - Introduced tables for internet connection change cases and vTiger archive management, including records, relations, and checkpoints. - Implemented triggers to enforce append-only behavior for vTiger archive records and files. - Enhanced solution management with soft delete capabilities for sag_solutions and knowledge_articles. feat(scripts): add CRM benchmarking script for Ollama models - Developed a Python script to benchmark CRM models exposed through Ollama, including various test cases and scoring mechanisms. test(tests): add comprehensive tests for new features - Implemented tests for internet change case service, vTiger archive functionality, and sag solution knowledge management. - Ensured coverage for edge cases and error handling in the new features.
18 lines
710 B
SQL
18 lines
710 B
SQL
CREATE TABLE IF NOT EXISTS internet_connection_change_cases (
|
|
id BIGSERIAL PRIMARY KEY,
|
|
connection_id INTEGER NOT NULL REFERENCES internet_connections_connections(id) ON DELETE CASCADE,
|
|
source_type VARCHAR(80) NOT NULL,
|
|
source_key VARCHAR(255) NOT NULL,
|
|
source_label TEXT,
|
|
source_url TEXT,
|
|
sag_id INTEGER REFERENCES sag_sager(id) ON DELETE SET NULL,
|
|
changes JSONB NOT NULL DEFAULT '{}'::jsonb,
|
|
last_error TEXT,
|
|
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
|
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
|
UNIQUE(connection_id, source_type, source_key)
|
|
);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_internet_change_cases_sag
|
|
ON internet_connection_change_cases(sag_id);
|