Skip to content

Instantly share code, notes, and snippets.

@EtherAdmin
EtherAdmin / 020_qcp_agent_status.sql
Created May 9, 2026 10:19
QCP migration 020 - apply against cms_augmentation on psql-cms-call-router
-- Migration 020: qcp_agent_status + qcp_agent_status_events
-- Source: services/queue-control-plane backed-by-postgres branch (PR #41).
-- Run against database `cms_augmentation` on `psql-cms-call-router`.
-- Idempotent retry: CREATE TABLE will raise 42P07 ("relation already exists") if rerun.
-- ============================================================
-- Current state
-- ============================================================
CREATE TABLE qcp_agent_status (
tenant_id UUID NOT NULL REFERENCES tenants(id) ON DELETE CASCADE,