Implement replay-safe browser synchronization
This commit is contained in:
parent
06a7ac56b7
commit
459ffa04c6
1 changed files with 2734 additions and 25 deletions
10
crates/remora-api/migrations/0002_live_event_tickets.sql
Normal file
10
crates/remora-api/migrations/0002_live_event_tickets.sql
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
CREATE TABLE live_event_tickets (
|
||||
ticket_digest BYTEA PRIMARY KEY CHECK (octet_length(ticket_digest) = 32),
|
||||
principal JSONB NOT NULL,
|
||||
origin TEXT NOT NULL CHECK (origin <> ''),
|
||||
created_at TIMESTAMPTZ NOT NULL,
|
||||
expires_at TIMESTAMPTZ NOT NULL CHECK (expires_at > created_at)
|
||||
);
|
||||
|
||||
CREATE INDEX live_event_tickets_expiry_idx
|
||||
ON live_event_tickets (expires_at);
|
||||
Loading…
Reference in a new issue