Files
ewoooc/migrations/043_allow_ollama_other_ai_calls_provider.sql
OoO 12c8c7e94d
All checks were successful
CD Pipeline / deploy (push) Successful in 1m6s
V10.538 對齊 ai_calls ollama_other provider
2026-06-01 02:37:12 +08:00

33 lines
938 B
PL/PgSQL

-- Migration 043: allow telemetry-only ollama_other provider
-- Date: 2026-06-01
--
-- Runtime code maps unresolved or unknown Ollama hosts to `ollama_other`.
-- This is not a routing target; it is an observability bucket for failures
-- that happen before a concrete GCP-A/GCP-B/111 host is selected.
BEGIN;
ALTER TABLE IF EXISTS ai_calls
DROP CONSTRAINT IF EXISTS chk_ai_calls_provider;
ALTER TABLE IF EXISTS ai_calls
ADD CONSTRAINT chk_ai_calls_provider
CHECK (
provider IN (
'gcp_ollama',
'ollama_secondary',
'ollama_111',
'ollama_other',
'gemini',
'claude',
'nim',
'openrouter',
'nim_via_elephant'
)
) NOT VALID;
COMMENT ON CONSTRAINT chk_ai_calls_provider ON ai_calls IS
'Provider telemetry whitelist; ollama_other is unresolved/unknown Ollama host telemetry, not a route.';
COMMIT;