Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions db/postgres/20261021130815_node_execution_policy.down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-- Roll back policy readers and writers before removing their columns.
SET LOCAL lock_timeout = '1s';
SET LOCAL statement_timeout = '5s';

ALTER TABLE node_status_snapshots
DROP COLUMN execution_policy,
DROP COLUMN execution_policy_received_at;
14 changes: 14 additions & 0 deletions db/postgres/20261021130815_node_execution_policy.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
SET LOCAL lock_timeout = '1s';
SET LOCAL statement_timeout = '5s';

ALTER TABLE node_status_snapshots
ADD COLUMN execution_policy JSONB,
ADD COLUMN execution_policy_received_at TIMESTAMPTZ,
ADD CONSTRAINT node_status_execution_policy_observation CHECK (
(execution_policy IS NULL) = (execution_policy_received_at IS NULL)
) NOT VALID;

COMMENT ON COLUMN node_status_snapshots.execution_policy IS
'Validated execution eligibility observation; NULL means unknown policy, not an empty allowlist';
COMMENT ON COLUMN node_status_snapshots.execution_policy_received_at IS
'Control-plane receipt time for this policy; inventory-only reports from older writers do not refresh it';
Loading