> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prod.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Prod AI Database

> Give every app its own managed AWS Aurora PostgreSQL database on your infrastructure with automatic schema migrations on deploy

## Overview

Nearly every app built with AI needs a database. The moment a builder prompts Prod AI to "track requests," "store approvals," or "save user preferences," that app needs persistent storage.

Without a native database, IT either provisions and manages databases manually for every app (which does not scale), or builders reach for external storage that moves data outside your network.

Prod AI Database solves both problems:

* **Every app gets its own Aurora PostgreSQL database automatically.** Builders describe what they need, and Prod AI provisions an isolated database on your infrastructure with no tickets or manual database setup.
* **Data never leaves your network.** Databases run on **AWS Aurora PostgreSQL** inside your own AWS account and VPC on [Managed BYOC](https://docs.prod.ai/deployment/cloud-prem/aws.md). Prod AI orchestrates provisioning while your data stays in your infrastructure.
* **Development and production are separated by default.** Each app gets a separate database per environment and [data tag](https://docs.prod.ai/development-lifecycle/build/data-tags.md), and Prod AI handles schema migrations automatically on publish. Test data never reaches production.
* **Pay for what your apps use.** Databases run on Aurora Serverless v2, scaling compute within the capacity bounds your admins configure. Many apps share each Aurora cluster (100 apps per cluster by default) to keep costs predictable, and Prod AI adds clusters as capacity fills.

## How it works

### 1. Enable once on your Managed BYOC deployment

Enabling Prod AI Database is a one-time infrastructure configuration on [Managed BYOC](https://docs.prod.ai/deployment/cloud-prem/aws.md) after your [data planes](https://docs.prod.ai/deployment/architecture/data-planes.md) and [data tags](https://docs.prod.ai/development-lifecycle/build/data-tags.md) are set up. Work with your Prod AI team to configure the AWS prerequisites and enable database provisioning for your data planes, then provision the first Aurora cluster from the Prod AI admin panel.

See [Setup](https://docs.prod.ai/admin/prod-ai-on-aws/database-setup.md) for prerequisites and capacity planning.

### 2. Prod AI provisions a development database

When a builder prompts for persistent data in Prod AI (for example, "add a database to track commission rate requests"):

* The coding agent requests an isolated development database for that app on your data plane
* Your data plane provisions the database inside your VPC
* The coding agent proposes the schema (tables, columns, indexes) and runs migrations
* The coding agent wires up the backend APIs to read and write data

### 3. Each environment gets its own database

Development and production are separate databases. Prod AI creates one logical database per app and [data tag](https://docs.prod.ai/development-lifecycle/build/data-tags.md) in the data plane serving that tag.

### 4. Schema migrations run on deploy

The coding agent stores schema changes alongside the application's code as `.sql` migration files. When a builder publishes, Prod AI automatically:

* Creates the production database if it does not already exist
* Applies the app's migrations to produce the same schema with none of the development data
* Blocks the deploy until the production database and migrations succeed

## Next steps

> [card] [Setup](https://docs.prod.ai/admin/prod-ai-on-aws/database-setup.md)
>
> Prerequisites, capacity planning, and enabling Prod AI Database on Managed BYOC.

> [card] [Security model](https://docs.prod.ai/admin/prod-ai-on-aws/database-security.md)
>
> How isolation, IAM roles, and the control plane trust boundary work.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.