RC-10-A
All checks were successful
release-tag / release-image (push) Successful in 4m43s

This commit is contained in:
2026-08-11 22:18:08 +02:00
parent 74d6b2f7d2
commit a88e75a8c4
4 changed files with 107 additions and 0 deletions

View File

@@ -173,3 +173,20 @@ CREATE TABLE IF NOT EXISTS customer_link_tokens (
created_at INTEGER NOT NULL
);
CREATE INDEX IF NOT EXISTS customer_link_tokens_exp_idx ON customer_link_tokens(expires_at);
-- Durable outbox for hosted-worker positive-tip rewards. A "positive tip" is
-- a signed guess that improves that worker's personal best score. Delivery to
-- Customer Service is retried and the event id is idempotent there.
CREATE TABLE IF NOT EXISTS hosted_credit_events (
event_id TEXT PRIMARY KEY,
worker_client_id TEXT NOT NULL REFERENCES clients(id) ON DELETE CASCADE,
reward_client_id TEXT NOT NULL REFERENCES clients(id) ON DELETE CASCADE,
task_id TEXT NOT NULL REFERENCES tasks(id) ON DELETE CASCADE,
seq INTEGER NOT NULL,
score REAL NOT NULL,
created_at INTEGER NOT NULL,
delivered_at INTEGER,
attempts INTEGER NOT NULL DEFAULT 0,
last_error TEXT NOT NULL DEFAULT ''
);
CREATE INDEX IF NOT EXISTS hosted_credit_events_pending_idx ON hosted_credit_events(delivered_at,created_at);