-- Support pause/resume task execution tracking queries.
--
-- The app records `paused` and `resumed` events in `task_activity_logs`
-- while task status remains `in_progress`. This index speeds up lookups
-- that resolve current pause state and execution-time calculations.

create index if not exists idx_task_activity_logs_task_action_created_at
  on public.task_activity_logs(task_id, action_type, created_at desc);
