Use UUID in table reference instead of ID as primary key

Hello,

I originally generated my tables using Primary ID keys (1,2,3,4 etc.). I was told it's not safe and to use UUID instead.

I would like to send UUID to my front-end and no longer the primary ID key (1,2,3,4). Whenever these is a table relationship to my main user table, it's always pointing to the user_id and not the UUID. How can I change this?

Thank you

14 replies