Random question, but does supabase have a way to t...
# off-topic
l
Random question, but does supabase have a way to turn your already created database & functions into a single SQL script so you can export/share it?
m
Hey, just wanted to share something I'm doing related to this in case it suits you
I'm planning to use a tool called prisma-schema to 1) introspect the schema I've already created in the dashboard and define it in my codebase and 2) manage the schema moving forward from within the codebase, without using the dashboard
I like this because the schema declarations are fully managed from within the codebase and checked into version control
so if I ever wanted to re-create the supabase project or migrate to a separate postgres instance, it would be very trivial to re-create the schema (only a single command using prisma-migrate)
m
There are a couple of tools I think fit the bill. I've used https://github.com/djrobstep/migra to introspect and dump a diff and I liked it.
c
> turn your already created database & functions into a single SQL script you can also just run a pg_dump! https://supabase.com/docs/guides/database#migrating-between-projects