mirror of
https://github.com/zyycn/codex-proxy-rs.git
synced 2026-11-25 00:00:39 +00:00
feat: align account lifecycle
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -64,6 +64,18 @@ create table if not exists accounts (
|
||||
create index if not exists idx_accounts_status on accounts(status);
|
||||
create index if not exists idx_accounts_identity on accounts(account_id, user_id) where account_id is not null;
|
||||
|
||||
-- ============================================
|
||||
-- Account Refresh Leases
|
||||
-- ============================================
|
||||
create table if not exists account_refresh_leases (
|
||||
account_id text primary key references accounts(id) on delete cascade,
|
||||
owner text not null,
|
||||
expires_at text not null,
|
||||
updated_at text not null
|
||||
);
|
||||
|
||||
create index if not exists idx_account_refresh_leases_expires on account_refresh_leases(expires_at);
|
||||
|
||||
-- ============================================
|
||||
-- Account Usage Statistics
|
||||
-- ============================================
|
||||
|
||||
Reference in New Issue
Block a user