Release v4928.1.4.2 stable
This commit is contained in:
12
migrations/004_outbox_safety.sql
Normal file
12
migrations/004_outbox_safety.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
-- ClientFlow v4 migration 004: stronger outbox idempotency and state visibility.
|
||||
ALTER TABLE integration_outbox ADD COLUMN IF NOT EXISTS locked_at TIMESTAMPTZ;
|
||||
ALTER TABLE integration_outbox ADD COLUMN IF NOT EXISTS lock_owner TEXT;
|
||||
ALTER TABLE integration_outbox ADD COLUMN IF NOT EXISTS ignored_at TIMESTAMPTZ;
|
||||
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS ux_integration_outbox_idempotency_key
|
||||
ON integration_outbox(idempotency_key)
|
||||
WHERE idempotency_key IS NOT NULL;
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_integration_outbox_pending_dispatch
|
||||
ON integration_outbox(target_system, created_at)
|
||||
WHERE status = 'pending';
|
||||
Reference in New Issue
Block a user