Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
With this PR, users can choose between UUIDv4 and UUIDv7 for their PKs.
Related Issue
This PR implements the request made in #1532.
Motivation and Context
Using UUIDv7 yields faster I/O because they're sortable and, thus, friendlier to database indices. Being sortable, it's also possible to show the chronological order of historical records when these are created with below-minute resolution (the lowest allowed by
history_date) or when multiple records are set to have the samehistory_datebut with a meaningful order of insertion.The implementation is non-breaking in that it adds a new settings for specifying the UUID version, falling back to UUIDv4 (the currently only option) if unspecified.
How Has This Been Tested?
With the full test suite. The MySQL tests couldn't even run on my machine, so I'd be happy for some help to make that work locally if required.
Screenshots (if appropriate):
N/A
Types of changes
Checklist:
pre-commit runcommand to format and lint.AUTHORS.rstCHANGES.rst