forked from unimatrix/web
Add receipt-bound native kit delivery and Paper metadata verification
This commit is contained in:
parent
eccff352da
commit
99b4c89ee9
1 changed files with 909 additions and 1 deletions
9
network/server-control/kit-delivery-schema.sql
Normal file
9
network/server-control/kit-delivery-schema.sql
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
CREATE TABLE IF NOT EXISTS dune_kit_deliveries (
|
||||
id UUID PRIMARY KEY,
|
||||
buyer_uuid UUID NOT NULL,
|
||||
snapshot_json TEXT NOT NULL CHECK (octet_length(snapshot_json) <= 65536),
|
||||
snapshot_hash CHAR(64) NOT NULL CHECK (snapshot_hash ~ '^[a-f0-9]{64}$'),
|
||||
created_at BIGINT NOT NULL CHECK (created_at > 0),
|
||||
delivered_at BIGINT NULL CHECK (delivered_at IS NULL OR delivered_at > 0)
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS dune_kit_deliveries_pending ON dune_kit_deliveries(buyer_uuid,created_at,id) WHERE delivered_at IS NULL;
|
||||
Loading…
Reference in a new issue

Staff