new-site/api/migrations/021_defer_until.sql
justin f8cd37ac8c Initial commit — Performance West telecom compliance platform
Includes: API (Express/TypeScript), Astro site, Python workers,
document generators, FCC compliance tools, Canada CRTC formation,
Ansible infrastructure, and deployment scripts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 06:54:22 -05:00

7 lines
344 B
PL/PgSQL

-- Migration 021: Add defer_until to formation_orders for holiday/schedule deferred jobs
BEGIN;
ALTER TABLE formation_orders ADD COLUMN IF NOT EXISTS defer_until TIMESTAMPTZ;
CREATE INDEX IF NOT EXISTS idx_formation_orders_deferred
ON formation_orders (defer_until)
WHERE automation_status = 'Deferred' AND defer_until IS NOT NULL;
COMMIT;