Do I need to add userId column in SQL if I need to...
# sql
d
Do I need to add userId column in SQL if I need to get a specific user's posts?
u
You’d need to update the userId column to be uuid type not text. The column def would be something like this:
userId uuid references auth.users not null
d
Thank you for the confirmation. But does it make difference in using uuid or text field?
u
Yeah for the foreign key relation to work work the type has to match. Since the type in the auto generated auth.users table is uuid you’d have to use that
d
I don't have
auth.users
table
oh
Thanks for the link
u
You do it’s just not accessible by default since it’s a different schema (for security)
d
Cool