-- Add composite indexes on Assignment for status+date-range queries
-- These speed up cross-project status scans and project-scoped status+date filters.

CREATE INDEX CONCURRENTLY IF NOT EXISTS "assignments_status_startDate_endDate_idx"
  ON "assignments" ("status", "startDate", "endDate");

CREATE INDEX CONCURRENTLY IF NOT EXISTS "assignments_projectId_status_startDate_endDate_idx"
  ON "assignments" ("projectId", "status", "startDate", "endDate");
