Files
codex-proxy-rs/backend/migrations/0041_account_model_catalogs.sql
T
ZyyandCodex d3143406dc fix(openai): restore account catalogs without blocking requests
Persist validated directories per credential revision. Restore them in bulk and refresh only missing, expired, or changed accounts with paced background requests. Filter large pools using current per-account evidence while preserving unknown and explicitly allowed candidates.

Co-authored-by: Codex <noreply@openai.com>
2026-11-11 03:46:25 +08:00

11 lines
491 B
SQL

-- 每个账号只保留最后一次成功观测,凭据轮换后旧目录不能成为新凭据的权限证据
create table provider_account_model_catalogs (
account_id text primary key references provider_accounts(id) on delete cascade,
credential_revision bigint not null check (credential_revision > 0),
plan_type text,
etag text,
observed_at timestamptz not null,
document bytea not null,
document_hash bytea generated always as (sha256(document)) stored
);