Database Branches
Learn about Database Branches in WaymakerOS.
When you deploy a preview of a git branch, Waymaker gives that preview its own isolated copy of your database — so you can test changes against real-shaped data without any risk to production.
Why this matters
Say you're building a feature that changes how orders are stored. You push it to a branch, Waymaker deploys a preview, and that preview gets its own branch database — a copy of your production database that starts identical but is completely separate. Your feature reads and writes the branch copy. Production data is never touched. When you're happy, you merge; when you're not, you throw the branch away and production never knew.
How it works
- Automatic with previews. If your app has a database, deploying a branch preview automatically creates a matching branch database. Nothing to set up.
- Isolated writes. The preview reads and writes its branch copy. Changes there never reach production.
- Efficient. A branch copy shares storage with its parent until it starts to differ, so it's cheap to create and fast to spin up.
- The preview uses it automatically. For that preview build only, the app points at the branch database instead of production — your code doesn't change.
- Redeploying reuses it. Push again to the same branch and the same branch database is reused, so your test data persists across preview deploys.
Cleaning up
Branch databases are torn down automatically so they don't linger or keep costing you:
- When the pull request is closed or merged, the branch database is deleted.
- You can remove one manually with the Remove button in the workspace.
- A nightly cleanup removes branches whose previews are gone.
When a branch database is deleted, its share of the cost stops.
Managing branches directly
You can also work with branches from the branch switcher at the top of the database workspace:
- See all branches for the database.
- Create a new one.
- Switch which branch the Tables, Monitoring, and Backup tabs are looking at.
- Delete any branch except the default (the default is your production database and can't be removed).
What it costs
Each active branch database adds to your daily database cost while it exists, and stops the moment it's torn down. See Database Billing for the full picture.
Next Steps
- Database Billing — what a branch adds
- The Database Workspace — the branch switcher
- Backups & Restore — a different kind of safety net