Netlify Database - Ship data-driven apps without breaking flow
by•
Netlify Database is a fully managed PostgreSQL database that integrates seamlessly with your Netlify projects. It provides automatic database branching for deploy previews, built-in migration support, and a best-in-class local development experience.



Replies
Netlify
Couldn't be more excited about this! From my earliest days building on the web, the jump between building something and connecting it with a database was far from easy - especially for small, simple projects. So much work-work just to get something basic live. Netlify Database changes this... every version of every project gets their own database, so you can iterate quickly without risking any silly changes. one of my absolute favourite @Netlify launches!
It's exciting to see this live! For newer builders database is admittedly the scary part of a project. Now with a safe sandbox to build, test and ship it's an entirely different experience. Plus the fact that there's no rewiring required is awesome AND no more fear of breaking production. Hats off to our product team for making this feel so seamless! 🚀"
CatDoes
Great launch @thisiskp_ and @Netlify! 🚀
Also curious: what’s the disaster recovery story if something goes wrong in production?
Netlify
@mahdi_nouri hey man! How are you? Thanks for the Q.
Netlify Database's disaster recovery approach is built around reducing blast radius and fast recovery: most changes happen in isolated database branches (deploy previews / agent runs), not directly on production.
Before publishing a production deploy, we take a snapshot of the production database so you have a restore point if something goes wrong (retention varies by plan).
@mahdi_nouri @thisiskp_
There are also classic scheduled backups taken automatically, and whatever the kind of backup - if you restore it - we keep a branch with the pre-restore production branch contents.
That means you can:
Access the contents of that branch to figure out the most-recent data that wasn't in the backup.
If need be, as a final failsafe, our support can revert your restore by reverting to that branch.
There are always a number of ways things can go wrong, especially when merging changes to production having un-intended consequences. We're still working on more tweaks to minimize things going wrong, and providing easier means to recover from sticky situations.
Adjust Page Brightness - Smart Control
What happens to orphaned branches when a PR is closed or merged?
@kshitij_mishra4
we actually don't automatically delete deploy previews when a PR is closed or merged - this was true before Netlify Database and also true with Netlify Database.
We have an automatic deploy deletion policy base on time. When all deploys referencing a database branch are deleted (automatically or manually), only then the branch is deleted as well - so it doesn't fill up your branch quota (which we've worked to make as high as possible, but it's not infinite). So there are no orphan branches, but also no overly-aggressive and quick deletion of branches that you still may want to keep around for a while, for reference.
We will probably be tweaking the deploy deletion policy soon to have more old deploys auto-deleted, so that more database branches get auto-deleted over time and you won't hit your branch quota and have to start deleting deploys yourself. But in any case it's not going to be stingy or aggressive. You will have ample time to keep older deploys and their branches available for viewing if need be.
ZeroHuman.
Congrats on the launch!
How does Netlify Database handle migration drift? For example, if I have two PR branches with different schema changes, how does the system manage the merge back to production to ensure no data is lost or overwritten?
Excited to check it out, this looks awesome!!!
This could remove a huge amount of friction for teams working on feature branches . No more worrying about messing up shared data
Netlify is already a fantastic choice for hosting and now I can start my project right on the platform and integrate with the top AI models. Great experience so far over 5+ years using the platform.
Netlify
@affan_ahmad4 lovely to hear that you've been with us for over 5 years.. let us know if you end up building anything new with Netlify Database :)
branching for deploy previews is one of those features that quietly removes a whole class of staging-data bugs — nice to see it native instead of duct-taped via docker. how does the branch get its data: copy-on-write from main, fresh seed, or empty? and across long-lived preview branches with diverging schemas, does netlify reconcile migration drift on merge or is keeping branches consistent on the dev?