ehesp
07/29/2021, 9:34 AMcreate table if not exists public.profiles (
id uuid references auth.users primary key,
project text
);
When doing a query via the supabase JS client, how do you join on some of the data from the auth.users table?Sduu_
07/29/2021, 10:15 AMusers
table with the columns you will need from the auth.users
table and setup a trigger to always populate the users table that is in the public schema instead.
I'm not sure but I don't think you can query via the js client from the auth schemaowlnai
07/29/2021, 10:18 AMehesp
07/29/2021, 10:18 AMreferences auth.users
play then? I understand it created a FK, does it just enforce the id matches up with one in the auth.users table?Sduu_
07/29/2021, 10:19 AMfrom('profiles')select('id, users(<the primary or foreign key>, some_other_field
)')
Sduu_
07/29/2021, 10:20 AMehesp
07/29/2021, 10:21 AMprofiles
with an ID which does not exist within auth.users
, would this error?owlnai
07/29/2021, 10:21 AMSduu_
07/29/2021, 10:22 AMSduu_
07/29/2021, 10:22 AMowlnai
07/29/2021, 10:24 AMehesp
07/29/2021, 10:24 AM