PostgreSQL doesn't support inline CONSTRAINT with WHERE clause. Changed to separate CREATE UNIQUE INDEX statement for the partial unique constraint on (tech_id, agent_id, status) WHERE status = 'active'. This ensures only one active tunnel session per (tech, agent) pair while allowing multiple closed sessions in history. Migration tested and verified on PostgreSQL 14.