FastAPI-boilerplate icon indicating copy to clipboard operation
FastAPI-boilerplate copied to clipboard

Switch from UUID v4 to v7

Open CHE1RON opened this issue 1 year ago • 1 comments

Describe the solution you'd like Migrate to using UUID v7 (uuid6 package, which despite its name provides uuid7() fn) as data type for id columns.

Additional context These articles outline advantages of v7 (as opposed to v4), and also some pitfalls of not doing so:

Link 1 comes with very detailed information about all UUID implementations (benchmarks included), Link 2 provides a well-rounded writeup on implications for PostgreSQL in particular!

CHE1RON avatar Mar 14 '24 09:03 CHE1RON

Very nice issue, @CHE1RON! Thanks!

igorbenav avatar Mar 14 '24 22:03 igorbenav