Netlify Database icon

Netlify Database

Netlify Database is a fully managed Postgres database built into Netlify for full-stack apps, with isolated branches and automatic migrations for safe testing.

Netlify Database

Overview

Netlify Database is a fully managed Postgres database built into the Netlify platform. It is designed to give Netlify projects an integrated database primitive without separate provisioning or a standalone database workflow.

The product centers on isolated database branches for production deploys, deploy previews, and agent runs. That setup lets teams test schema and data changes in a copy of production data, then promote changes through the normal deploy lifecycle with migrations applied automatically.

Features

Managed Postgres in Netlify

Netlify creates and manages Postgres databases inside the platform, handling provisioning and operational setup for you.

Automatic database branching

Production deploys use the main database, while deploy previews and agent runs get isolated branches with copies of production data.

Platform-managed migrations

Schema changes are tracked in repository migrations and applied automatically at the correct deploy stage to keep code and database in sync.

Platform-wide access

The database is accessible from Functions, Edge Functions, Builds, and Agent Runners, so application code can read and write relational data from multiple parts of the platform.

Agent-friendly CLI

The CLI is designed for automation with structured `--json` output and non-interactive flags, which makes it easier to script database workflows.

Credit-based usage model

When the database is active, it uses credits for compute and bandwidth; storage is stated as free until July 1, 2026.

Use Cases

  • Full-stack app backends

    Store relational application data in a managed Postgres database that is already part of the Netlify workflow, so you do not need to wire up a separate database service for a new app.

  • Safer schema changes

    Test schema updates and data mutations in deploy-preview branches that mirror production data, then validate the changes before merging to production.

  • Agent-driven development

    Give AI agents isolated database branches so they can experiment with queries and schema changes without risking live data or production deploys.

  • Platform-integrated data access

    Read and write data from Functions, Edge Functions, Builds, and Agent Runners when your app needs database access across multiple Netlify runtime surfaces.

Pros and Cons

Pros

  • Managed Postgres is built into the Netlify platform, reducing setup overhead.
  • Deploy previews and agent runs get isolated database branches by default, which helps protect production data.
  • Migrations are applied automatically at the correct point in the deploy lifecycle.
  • The database can be used from Functions, Edge Functions, Builds, and Agent Runners.
  • The CLI exposes structured output and non-interactive flags for automation.

Cons

  • Available only on credit-based plans.
  • Storage is free only until July 1, 2026, so long-term costs are not fully fixed from the documentation provided.
  • The native migration system is optional, but using your own tooling means you must manage preview and production migrations yourself.

FAQ

What plan do I need to use Netlify Database?

Netlify Database is available on credit-based plans only. The docs say it consumes credits for compute and bandwidth when active, while database storage space is free until July 1, 2026.

How are schema migrations handled?

Migrations are stored in `netlify/database/migrations` and are applied automatically at the right point in the deploy lifecycle: before production deploys are published and before deploy previews become available.

What happens in a deploy preview?

Deploy previews get their own database branch, created from a copy of production data when the preview is first created. Changes in that branch do not affect production, and the branch can be reset if needed.

Is Netlify Database built for AI agents?

Yes. The docs say each agent run gets its own database branch automatically, and the CLI is designed with structured `--json` output and non-interactive flags for programmatic use.

Can I manage migrations with my own tools?

Netlify says the native migration system is recommended, but it is optional. You can use your own migration tooling if you manage the deploy-preview branch yourself and handle production migrations outside the platform hook.

Quick Facts

Category
Developer Tool
Product type
Managed Postgres database
Platform
Netlify
Primary users
Developers building full-stack apps on Netlify
Source domain
docs.netlify.com
Workflow
Branch-based preview databases with automatic migrations