Files
krow_backend/migrations/000009_confirmation_replay.down.sql
2026-08-28 12:21:44 +05:30

19 lines
667 B
SQL

-- Reverses 000009.
--
-- Dropping `inputs` returns the system to matching a re-derived call against a
-- hash — which is the behaviour that loses approvals when a model answers a
-- resumed turn differently. Outstanding tokens survive the rollback and still
-- resolve; they simply become dependent on the model repeating itself again.
--
-- Nothing already written is affected: a spent confirmation has, by then,
-- already done its job.
SET search_path = public;
ALTER TABLE agent_confirmations
DROP CONSTRAINT IF EXISTS agent_confirmations_inputs_is_object;
ALTER TABLE agent_confirmations
DROP COLUMN IF EXISTS inputs,
DROP COLUMN IF EXISTS agent_id;