HackerTrans
TopNewTrendsCommentsPastAskShowJobs

t27duck

no profile record

Submissions

Using UUIDv7 with Ruby on Rails Without PostgreSQL 18

t27duck.com
2 points·by t27duck·8 bulan yang lalu·3 comments

comments

t27duck
·8 bulan yang lalu·discuss
The big drawback is if your app also uses bulk sql inserts which bypasses model hooks. By letting the database handle it, all cases are covered.
t27duck
·8 bulan yang lalu·discuss
The app I work on at my day job uses UUIDs for primary keys. I'm not sure when/if an upgrade to PostgreSQL 18 will happen, but we wanted to take advantage of timestamp-based UUIDv7. Turns out, it's relatively easy to implement in current Rails with PostgreSQL < 18.