Hi, I created this https://supabase-schema.vercel....
# ideas-and-suggestions
z
Hi, I created this https://supabase-schema.vercel.app/ to visualize Supabase schema easily. But visually creating and define relationship, then export as sql could be a great
enhancement
for this tools. 😍🔥
b
This is so good
Any way to export the schema?
g
This is neat!
z
Thank you for creating this thread.. this is new feature on Discord right? hahaha
g
Yes, thank you (:
z
Export the schema in what format ya? jpg/png?
b
I meant the sql schema
g
Export the code?
z
icic, not yet
g
You know what would be neat too? If you could let us create, edit, delete tables and like keep track of revisions
Eitherway, I really like and appreciate this. Thank you for creating it (:
b
hmm
I don't think it's possible with the current client libraries
g
Awh, how come? 😦
b
it's for security
z
exporting the sql schema meaning something like this?
Copy code
CREATE TABLE accounts (
    user_id serial PRIMARY KEY,
    username VARCHAR ( 50 ) UNIQUE NOT NULL,
    password VARCHAR ( 50 ) NOT NULL,
    email VARCHAR ( 255 ) UNIQUE NOT NULL,
    created_on TIMESTAMP NOT NULL,
        last_login TIMESTAMP 
);
Yup, due to security reason, the API for creating/editing table is not available (in public)
but.. the API is actually there, check out https://github.com/supabase/postgres-meta
b
like this one:
z
But what I had in mind is
user
can drag and drop creating/edit table, then it will generate either
create table or alter table
The part where creating table is possible, but not with RLS and function
due to current process of obtaining the database schema
i chose to use
url
and
anon
key because either way these info will be shown in
network
tab in Devtools, and Supabase encourage developer to enable RLS for security, so developer feels more
secured
in providing important information to an Open-Source product.
c
@User , just wanted to say how useful your tool has been. Really awesome, so thank you!
z
Awesome! I updated it few hours ago, hope it will provides better experience ya