mirror of
https://github.com/openai/codex.git
synced 2026-04-26 07:35:29 +00:00
codex: add timer and message state storage
This commit is contained in:
22
codex-rs/state/migrations/0025_thread_timers.sql
Normal file
22
codex-rs/state/migrations/0025_thread_timers.sql
Normal file
@@ -0,0 +1,22 @@
|
||||
CREATE TABLE thread_timers (
|
||||
id TEXT PRIMARY KEY,
|
||||
thread_id TEXT NOT NULL,
|
||||
source TEXT NOT NULL,
|
||||
client_id TEXT NOT NULL,
|
||||
trigger_json TEXT NOT NULL,
|
||||
prompt TEXT NOT NULL,
|
||||
delivery TEXT NOT NULL,
|
||||
created_at INTEGER NOT NULL,
|
||||
next_run_at INTEGER,
|
||||
last_run_at INTEGER,
|
||||
pending_run INTEGER NOT NULL
|
||||
);
|
||||
|
||||
CREATE INDEX idx_thread_timers_thread_created
|
||||
ON thread_timers(thread_id, created_at, id);
|
||||
|
||||
CREATE INDEX idx_thread_timers_thread_pending
|
||||
ON thread_timers(thread_id, pending_run, created_at, id);
|
||||
|
||||
CREATE INDEX idx_thread_timers_thread_next_run
|
||||
ON thread_timers(thread_id, next_run_at);
|
||||
Reference in New Issue
Block a user