radio4000 / supabase

SQL & Supabase information for radio4000.com
0 stars 0 forks source link

Rename public.users to public.accounts #3

Closed oskarrough closed 2 years ago

oskarrough commented 2 years ago

Currently we have two tables in the schema: auth.users (from supabase for auth) and public.users from us, which we only use for storing when the user first was created.

I'd like to avoid any confusing between auth user and public user, so I say we rename users to accounts. Then it is clearly seperated with users being for authentication and accounts being for r4. Alternatively we could call it profiles, which is what most supabase examples use now.

Also enable tracks table for realtime in case..

4www commented 2 years ago

the prefix public. seems to me like it should avoid confusion already, and still shows it is the same data.

But maybe it is not the same data, and in psql context it adds clarity, so i trust your decision on this case

oskarrough commented 2 years ago

Thanks!

oskarrough commented 2 years ago

The public schema was supposed to solve this, and technically does, but if we query users without a prefix like select * from users or supabase.from('users').select('*') you no longer know what you get. It depends on the PostgreSQL search_path and I don't know what. Having two different names makes it so we don't have to think about..