Split a Supabase schema without losing its order
Why one Supabase schema dump is hard to work with, and how Supabee sync schema creates ordered per-object files.
supabase db dump has the same shape of problem. Your whole schema arrives as one file: every table, function, type, policy, and trigger in the project, in one place.
Declarative schemas
Other than being difficult to review and edit, Supabase's declarative workflow wants a readable schema definition, the same way Prisma, Drizzle or Django let you edit one table definition and generate the migration from it.
If you write those definitions by hand, you split the schema into a file per object yourself, and then the ordering becomes your problem: types before the functions that use them, tables before the policies that reference them.
Use supabee sync schema
supabee sync schemasupabee sync schema keeps the dump's valid order while splitting it into a folder tree, one file per object. It records the source lines and full sequence so Supabee can rebuild and validate the result without you managing dependencies yourself.
So you get the per-object files without working out the dependency order yourself. The seed workflow has nothing equivalent, because rows do not depend on each other the way schema objects do.