FastAPI-boilerplate
FastAPI-boilerplate copied to clipboard
Switch from UUID v4 to v7
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!
Very nice issue, @CHE1RON! Thanks!