The databases do not keep track of document order internally so when sorting by non-unique fields such as shared `order` number values, the returned order will be random and not consistent. While this issue is far more noticeable on mongo it could also occur in postgres on certain environments. This combined with pagination can lead to the perception of duplicated or inconsistent data. This PR adds a second sort parameter to queries so that we always have a fallback, `-createdAt` will be used by default or `id` if timestamps are disabled.
Payload Drizzle Adapter
The Drizzle package is used by db-postgres and db-sqlite for shared functionality of SQL databases. It is not meant to be used directly in Payload projects.