mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
15 lines
505 B
SQL
15 lines
505 B
SQL
CREATE TABLE thread_queued_turns (
|
|
queued_turn_id TEXT PRIMARY KEY NOT NULL,
|
|
thread_id TEXT NOT NULL,
|
|
turn_submission_jsonb BLOB NOT NULL,
|
|
queue_order INTEGER NOT NULL,
|
|
state TEXT NOT NULL CHECK (state IN ('pending', 'dispatching', 'failed')),
|
|
dispatch_turn_id TEXT,
|
|
failure_jsonb BLOB,
|
|
created_at_ms INTEGER NOT NULL,
|
|
updated_at_ms INTEGER NOT NULL
|
|
);
|
|
|
|
CREATE INDEX thread_queued_turns_thread_state_order_idx
|
|
ON thread_queued_turns(thread_id, state, queue_order);
|