---
title: "Faster config, migrations and functions on branches"
description: "Supabase preview branches are separate projects that become ready in about 20 seconds (median) by running three mostly parallel workflows: copying configuration, applying migrations, and deploying Edge Functions."
url: "https://swe.quest/articles/faster-config-migrations-and-functions-on-branches-f64718202c9feaa6"
canonical: "https://supabase.com/blog/how-a-new-branch-gets-its-config-migrations-and-functions"
source: "Supabase"
published: "2026-10-15"
difficulty: "medium"
kind: "Deep dive"
reading_minutes: 7
tags: ["postgres","schema-migrations","deployment","ci-cd","serverless"]
---

# Faster config, migrations and functions on branches

A post on [Supabase](https://swe.quest/sources/supabase.md), published 2026-10-15, 7 min read, Deep dive. Original: [https://supabase.com/blog/how-a-new-branch-gets-its-config-migrations-and-functions](https://supabase.com/blog/how-a-new-branch-gets-its-config-migrations-and-functions)

## Summary

Supabase preview branches are separate projects that become ready in about 20 seconds (median) by running three mostly parallel workflows: copying configuration, applying migrations, and deploying Edge Functions. Postgres settings are written to disk without a restart so the single restart triggered by enabling WAL-G backups picks them up. SSL enforcement is ordered before the first backup so a restart can't corrupt it, and gitless branches wait for the last restart before migrating. Migrations are split by a Go reimplementation of psql's lexer, validated against regression tests and fuzzing, and each file runs as one pipelined transaction together with its history row. Edge Functions are skipped when the SHA-256 of their deterministic Brotli bundle and their JWT setting are unchanged.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [Schema migrations](https://swe.quest/tags/schema-migrations.md) (Data & databases)
- [Deployment](https://swe.quest/tags/deployment.md) (Reliability & operations)
- [CI/CD](https://swe.quest/tags/ci-cd.md) (Reliability & operations)
- [Serverless](https://swe.quest/tags/serverless.md) (Backend & APIs)

## Prerequisites

- PostgreSQL basics ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))
- database migrations ([easy posts on Databases](https://swe.quest/tags/databases.md?difficulty=easy))
- git-based preview environments

## Keywords

Supabase, Supabase Branching, Edge Functions, WAL-G, Supavisor, Brotli, config.toml

## Related posts

- [Supabase Branching](https://swe.quest/articles/supabase-branching-4fbb0c9896d51627.md): Supabase · 2023-12-13 · Medium · 5 min read · Schema migrations, PostgreSQL, CI/CD, Deployment
  Supabase Branching gives each Git branch an isolated hosted Preview environment with its own Postgres database, Auth, Storage, Realtime, Edge Functions and APIs, plus separate credentials.
- [Supabase CLI v2: Config as Code](https://swe.quest/articles/supabase-cli-v2-config-as-code-bd9ba93f5cb80d9d.md): Supabase · 2024-12-04 · Medium · 5 min read · Configuration management, Infrastructure as code, Developer tools, Deployment, PostgreSQL
  Supabase CLI v2 adds configuration as code: a committed \`config.toml\` declares Auth redirect URLs, Edge Function settings, Storage buckets seeded from local files, Postgres settings and experimental database webhooks, and these are promoted across preview, staging and production environments. \`supabase link\` diffs local config against the remote project to detect drift.
- [The Vibe Coder's Guide to Supabase Environments](https://swe.quest/articles/the-vibe-coder-s-guide-to-supabase-environments-2ce71129a08af138.md): Supabase · 2025-08-17 · Medium · 10 min read · Schema migrations, CI/CD, Deployment, PostgreSQL, Identity & auth
  Separate Supabase projects for development and production, with all schema changes captured as timestamped SQL migrations in a Git-tracked supabase/ directory, keep a fast workflow from breaking live data.
- [Supabase CLI v1 and Management API Beta](https://swe.quest/articles/supabase-cli-v1-and-management-api-beta-40e0f641270aa760.md): Supabase · 2022-08-15 · Medium · 4 min read · Schema migrations, Developer tools, PostgreSQL, CI/CD, API design
  Supabase CLI v1 leaves beta with commands to manage organizations, projects and Edge Functions, plus database migration tooling, CI/CD workflows and TypeScript type generation.
- [Supabase Local Dev: migrations, branching, and observability](https://swe.quest/articles/supabase-local-dev-migrations-branching-and-observability-770def662fe57683.md): Supabase · 2023-08-08 · Easy · 6 min read · PostgreSQL, Developer tools, Schema migrations, Testing, Deployment
  Supabase's CLI gains a batch of Postgres local-development features: \`supabase inspect db\` with 19 diagnostic commands adapted from Heroku's pg-extras, \`db dump\` backups built on pg\_dump, migration squashing and diffing via migra, pgTAP testing with \`supabase test\`, plpgsql\_check linting, seeding, and TypeScript type generation that now detects foreign-key relationships.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
