feat(execution): preserve durable recovery on canonical Rust core
This commit is contained in:
parent
5e9655de0b
commit
c01e96e4dd
27 changed files with 3644 additions and 182 deletions
13
database/postgres/init/15-canonical-paper-intents.sql
Normal file
13
database/postgres/init/15-canonical-paper-intents.sql
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
-- All owners at one financial revision commit one immutable native decision batch.
|
||||
-- Native order IDs are retained verbatim in checkpoints/journals, not legacy UUID tables.
|
||||
CREATE TABLE IF NOT EXISTS simulation_canonical_intents (
|
||||
account_id TEXT NOT NULL REFERENCES simulation_accounts(id),
|
||||
id TEXT NOT NULL,
|
||||
sequence BIGINT NOT NULL CHECK (sequence > 0),
|
||||
status TEXT NOT NULL CHECK (status IN ('pending', 'dispatched', 'failed')),
|
||||
payload JSONB NOT NULL,
|
||||
PRIMARY KEY (account_id, id),
|
||||
UNIQUE (account_id, sequence)
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS simulation_canonical_intents_pending
|
||||
ON simulation_canonical_intents(account_id, sequence) WHERE status = 'pending';
|
||||
Loading…
Add table
Add a link
Reference in a new issue