Files
buzz/migrations/0041_audio_cleanup_requests.sql
Cea Stapleton Cordasco eedb356f3d feat(db): persist protected object authority
Canonical O4 slice: 04_protected_authority
Final-tree source: e45553ea65b66631771c16908513f983d3c0b881

Signed-off-by: Cea Stapleton Cordasco <261786559+cea-block@users.noreply.github.com>
2026-08-04 11:43:38 -05:00

12 lines
534 B
SQL

-- Durable disconnect/cancellation intent for live audio attempts. A request is
-- witnessed before ephemeral cleanup begins, allowing another relay to finish
-- compensation immediately when the initiating process loses the race.
ALTER TABLE audio_session_admissions
ADD COLUMN cleanup_requested_at TIMESTAMPTZ;
CREATE INDEX idx_audio_session_admissions_cleanup_requested
ON audio_session_admissions (community_id, cleanup_requested_at)
WHERE cleanup_requested_at IS NOT NULL
AND state IN ('reserved', 'active');