mirror of
https://github.com/zyycn/codex-proxy-rs.git
synced 2026-11-18 00:07:02 +00:00
Remove unused event occurrence counts across storage, API and UI; count event rows directly and keep provider metadata focused on facts absent from typed observations. Preserve actual upstream-reported model and handshake status. Narrow four live-reference indexes, drop eight low-value indexes, enforce complete grouped facts and normalize administrator audit identities. Make backup storage changes invalidate verification and pause schedules atomically, while unchanged saves preserve state and revision. Validation: 1,816 backend tests passed with isolated PostgreSQL and Redis, including the official artifact download test. Strict Clippy, rustfmt, migration freeze checks, frontend lint/typecheck/build and actionlint passed. Synthetic 10,000-row query plans verified live-reference and historical pagination indexes. Co-authored-by: Codex <noreply@openai.com>
9 lines
420 B
SQL
9 lines
420 B
SQL
-- Each row records one event; aggregation is performed by the read queries.
|
|
alter table ops_events drop constraint ops_events_values_ck;
|
|
alter table ops_events drop column occurrence_count;
|
|
alter table ops_events add constraint ops_events_values_ck check (
|
|
(status_code is null or status_code between 100 and 599)
|
|
and (retry_after_ms is null or retry_after_ms >= 0)
|
|
and (latency_ms is null or latency_ms >= 0)
|
|
);
|