Issue #2304001 by Dave Reid: Queries for migrations that are using newOnly = TRUE should sort by primary key