feat: add durable Kuknos settlement coordination
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
CREATE TABLE kuknos_settlement_operator_audits (
|
||||
id bigserial PRIMARY KEY,
|
||||
settlement_id uuid NOT NULL REFERENCES kuknos_settlements(id),
|
||||
actor_id text NOT NULL CHECK (actor_id <> ''),
|
||||
action text NOT NULL CHECK (action IN ('RETRY')),
|
||||
reason text NOT NULL CHECK (reason <> ''),
|
||||
previous_status text NOT NULL,
|
||||
resulting_status text NOT NULL,
|
||||
created_at timestamptz NOT NULL DEFAULT clock_timestamp()
|
||||
);
|
||||
|
||||
CREATE INDEX kuknos_settlement_operator_audits_settlement_idx
|
||||
ON kuknos_settlement_operator_audits (settlement_id, created_at DESC);
|
||||
Reference in New Issue
Block a user