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
Mike_
01/05/2022, 6:54 PM
Hey, just wanted to share something I'm doing related to this in case it suits you
Mike_
01/05/2022, 6:55 PM
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
Mike_
01/05/2022, 6:56 PM
I like this because the schema declarations are fully managed from within the codebase and checked into version control
Mike_
01/05/2022, 6:57 PM
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
mattmatt
01/05/2022, 7:20 PM
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.