https://supabase.com/ logo
#sql
Title
# sql
j

jcald

09/17/2021, 5:01 PM
What are the sql commands, to obtain the description of a project including tables with keys, restrictions and relationships, etc. Thank you
s

silentworks

09/17/2021, 5:15 PM
There are no SQL commands for this, this information is stored in Supabase's own DB and not the one hosted for you
Also some of these things are on a table to table basis
Not sure what you mean by keys? as in primary keys?
j

jcald

09/17/2021, 7:47 PM
thank you, https://github.com/zernonia/supabase-schemasolves something, I like how it creates the diagram. On the other hand I remembered * show * from mysql, which is clear to me that it is not easy.
I leave you this track :
SELECT * FROM pg_catalog.pg_tables; -- where schemaname = 'public'; SELECT table_name, column_name, data_type FROM information_schema.columns WHERE table_name = 'posts';