News for hackers. Stuff that matters.
Re:Auto increment is a terrible idea by nathan_f77 on Thursday November 30, 2017 @09:00AM (#15815716)
I like using both UUIDs and integers. I use auto-incrementing integers internally for all the model relationships, but the user only ever sees random UIDs. I also like having different UID prefixes for each model, so you can tell what a given UID is referring to.

Here's the code I'm using for Rails: https://gist.github.com/ndbroadbent/628ef1d0c044e402d7501fb7...

There are no comments on this comment yet.