Files
foundry-core/db/009-canvas-ai-operations.sql
codex-bot fa76773efc
Foundry Go checks / check (push) Successful in 2m56s
Foundry Go checks / check (pull_request) Successful in 2m47s
Apply canonical AI outputs through scoped identity-checked changes
2026-11-08 00:23:00 +08:00

7 lines
385 B
PL/PgSQL

BEGIN;
-- Legacy requests retain NULL. Canonical operation identity cannot be replayed
-- under another transport key to admit a second paid execution.
ALTER TABLE canvas_ai_runs ADD COLUMN logical_operation_id uuid;
CREATE UNIQUE INDEX canvas_ai_logical_operation ON canvas_ai_runs(project,workspace_id,account_id,logical_operation_id) WHERE logical_operation_id IS NOT NULL;
COMMIT;