Netlify Database
Netlify Database is a zero-config, fully managed Postgres on Netlify with automated migrations and deploy preview branching for isolated testing.
What is Netlify Database?
Netlify Database is a fully managed Postgres database built into the Netlify platform. It provisions and manages the database for you, including applying migrations and creating database branches that fit into the Netlify deploy workflow.
The core purpose is to let you build full-stack applications with a relational database that stays aligned with your code changes—without manually managing separate staging databases or hand-running schema updates.
Key Features
- Fully managed Postgres on Netlify: Netlify handles provisioning so your application can start using a Postgres database without setting up infrastructure.
- Automated migrations tied to deploys: A built-in migration system tracks schema changes in your repository and applies them automatically during production deploys and deploy previews.
- Dynamic database branching integrated with deploy previews: Deploy previews get their own database branch created from a copy of production data at preview creation time.
- Production access protected by design: Production deploys are the only ones allowed to access the main database, reducing the chance that experimentation impacts live data.
- Isolated environments for AI workflows: Agent runs get their own database branch automatically, and Netlify provides an “Agent Runners” integration context so agents can work with schema changes and queries in isolation.
How to Use Netlify Database
- Create or select a credit-based Netlify plan that supports Netlify Database (Netlify Database is available on credit-based plans only).
- Implement schema and migrations in your repository using the documented migrations approach; Netlify will track schema changes and apply them at the right point in the deploy lifecycle.
- Deploy your application normally to production and create deploy previews through your usual workflow (for example, opening a pull request).
- Use deploy previews to test changes safely: Netlify will connect each deploy preview to its own database branch, copied from production when the preview is created.
Use Cases
- Validate schema changes without drifting from production: Automated migrations run on both production deploys and deploy previews, helping ensure the database schema matches the version of code being deployed.
- Safely test a new feature that mutates data: For example, you can validate an article-deletion flow in a deploy preview branch without removing content from the main production database.
- Prevent cross-team interference during parallel development: If multiple changes are worked on concurrently, separate deploy preview branches allow each preview to evolve without bottlenecking on a single shared staging database.
- Recover quickly from a bad migration or query: If an experimental change includes a query that unintentionally affects data, you can reset the affected database branch without impacting the live site.
- Run AI agents with isolated data access: When using Agent Runners, each agent run gets its own database branch so experiments (including schema changes) don’t risk corrupting production data.
FAQ
Is Netlify Database available on all Netlify plans?
Netlify Database is available on credit-based plans only.
Does database storage cost credits?
When a database is active, it consumes credits for compute and bandwidth used. The documentation also states that database storage space is free until July 1, 2026.
How are schema migrations applied?
Netlify Database includes an automatic migration system that tracks schema changes in your repository and applies them automatically on production deploys and deploy previews.
How does deploy preview data isolation work?
When a deploy preview is first created, Netlify takes a copy of the production data for that preview’s database branch. Changes made during the preview lifecycle do not affect the production database.
What is the role of database branching for AI agents?
Agent runs are connected to their own database branch automatically, enabling experiments and schema iterations in isolated environments.
Alternatives
- Self-managed Postgres with staging: Run your own Postgres instances (production + staging) and manage migrations manually or via CI/CD. This can resemble Netlify Database’s workflow, but you typically handle schema drift and environment synchronization yourself.
- Database-as-a-service (managed Postgres) with separate environments: Use a managed Postgres provider and create separate databases/schemas for staging and testing. You’ll still need to orchestrate branching-like isolation and migration timing.
- Migrations tooling with application-managed workflows: Use migration frameworks and apply migrations through your deployment pipeline. This gives control over when migrations run, but you won’t automatically get deploy-preview database branching as described here.
Alternatives
GitBoard
GitBoard is a native macOS menu bar app for GitHub Projects to view your kanban board, filter by status, search issues, and create or assign.
Polsia
Polsia is an autonomous AI system that plans, codes, and markets your company on a daily cadence while you sleep.
Biji
Biji is a versatile platform designed to enhance productivity through innovative tools and features.
Falconer
Falconer is a self-updating knowledge platform for high-speed teams to write, share, and find reliable internal documentation and code context in one place.
OpenFlags
OpenFlags is an open source, self-hosted feature flag system with a control plane and typed SDKs for progressive delivery and safe rollouts.
Planndu: Daily Task Planner
Planndu is an intuitive productivity application designed to help users organize tasks, manage projects, build routines, and enhance focus using tools like AI generation and a built-in Pomodoro timer.