> branches

PlanetScale's signature feature: database branches that work like git branches. Spin up an isolated copy of your schema (optionally with data), develop against it, diff it, lint it, and promote it — all without touching production. These commands drive the daily loop: create a branch per feature, iterate, then hand it to a deploy request.

// branches

14 commands

// faq

Does a new branch copy my production data?

No — by default a branch copies only the schema of its parent, starting with empty tables. Pass --seed-data at creation to use Data Branching, which clones the parent's data into the branch (billed at the parent's cluster size), or --restore <backup-id> to hydrate a branch from a specific backup.

What's the difference between a development and a production branch?

A production branch is highly available, backed up daily, and (on Vitess) protected from direct DDL when safe migrations are on — schema changes must arrive via deploy requests. Development branches are cheap, disposable copies for iterating. `pscale branch promote` upgrades a branch to production; `demote` reverses it.

Why can't I run ALTER TABLE directly on main?

Safe migrations. When enabled on a production branch (`pscale branch safe-migrations enable`), direct DDL is rejected so every schema change flows through a deploy request — which gives you linting, review, non-blocking rollout, and a revert window. Disable it only on throwaway databases.