logoalt Hacker News

mahboi • yesterday at 8:19 PM • 2 replies • view on HN

Don't expose your PKs


Replies

tyre • yesterday at 8:22 PM

So you have a second, opaque unique identifier for the frontend to fetch? At that point why not just use a single column (UUID)?

➕ show 3 replies
skrtskrt • today at 12:11 AM

This was hard enough to enforce when it was just people writing code, and once one of those stupid incrementing integer IDs go in a public API or important codepath, it can be a real pain to rip out.