From the source
Supabase explains how its branching system provisions a new preview branch with configuration, database schema, and Edge Functions, mostly in parallel, within about 20 seconds median.
- A branch gets its inputs either from a connected
GitHub repository or from the main project, depending on whether it is git-linked.
- The configuration step copies Postgres, Auth, Data API, Realtime, and Storage settings from the main project, then applies repo-specific overrides if a config.toml exists.
- Migrations are pulled from the repo or from the main project's migration history, then run as individual transactions against the branch database.





