-- Step 34: Add queueDepthAtPlacement to sessionItems
-- Records the number of items already in the queue when each item is placed,
-- enabling accurate serving-time analytics (queue depth at placement, not at serve time).

ALTER TABLE `sessionItems`
  ADD COLUMN `queueDepthAtPlacement` smallint(5) UNSIGNED DEFAULT NULL
  COMMENT 'Number of items ahead in queue when this item was placed'
  AFTER `courseNumber`;
