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
silentworks
09/17/2021, 5:15 PM
Also some of these things are on a table to table basis
silentworks
09/17/2021, 5:15 PM
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.
jcald
09/17/2021, 8:10 PM
I leave you this track
:
jcald
09/17/2021, 8:10 PM
SELECT * FROM pg_catalog.pg_tables;
-- where schemaname = 'public';
SELECT
table_name,
column_name,
data_type
FROM
information_schema.columns
WHERE
table_name = 'posts';