mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-27 21:33:41 +02:00
* fix(attribution): remove legacy invariant exemption Co-authored-by: multica-agent <github@multica.ai> * test(attribution): enforce strict legacy row rejection Co-authored-by: multica-agent <github@multica.ai> --------- Co-authored-by: Eve <eve@multica-ai.local> Co-authored-by: multica-agent <github@multica.ai>
10 lines
570 B
SQL
10 lines
570 B
SQL
-- Validate the strict shadow constraint only after the attribution backfill has
|
|
-- completed. This takes a SHARE UPDATE EXCLUSIVE lock while scanning the table,
|
|
-- which permits normal INSERT/UPDATE/DELETE traffic to continue.
|
|
--
|
|
-- Any remaining row where originator_user_id is set but accountable_user_id is
|
|
-- NULL or different causes this migration to fail closed. The validated shadow
|
|
-- replaces migration 190's transitional constraint in migration 199.
|
|
ALTER TABLE agent_task_queue
|
|
VALIDATE CONSTRAINT agent_task_queue_accountable_matches_originator_strict;
|