# databases

> Managed databases by name.

Managed databases by name. Each environment gets its own instance (or a branch, for previews).

- **Type:** map of names to object
- **Since:** manifest v1

## Example

```yaml
databases:
  main:
    engine: postgres
    plan: standard
```

## Each entry

A managed database. Backed up by default to two off-site locations, with daily restore tests.

## Fields

| Field | Type | What it does |
| --- | --- | --- |
| [`engine`](/docs/manifest/databases/engine/) * | `postgres`, `valkey`, `mysql` | Database engine. |
| [`version`](/docs/manifest/databases/version/) | string | Major version. |
| [`plan`](/docs/manifest/databases/plan/) | `starter`, `standard`, `ha`, `ha-plus` | starter one instance, 7-day PITR; standard 14-day PITR and daily restore tests; ha adds a synchronous replica with automatic failover and 30-day PITR; ha-plus adds read replicas and 35-day PITR. |
| [`storage`](/docs/manifest/databases/storage/) | [size](/docs/manifest/#size) | Storage size. |
| [`backups`](/docs/manifest/databases/backups/) | object | Backup settings beyond the plan defaults. |
| [`extensions`](/docs/manifest/databases/extensions/) | list of `pgvector`, `postgis`, `pg_trgm`, `pg_stat_statements`, `pgcrypto`, `uuid-ossp`, `citext`, `hstore`, `pg_partman`, `timescaledb`, `pg_cron` | Postgres extensions from the allowlist. |
| [`maintenance_window`](/docs/manifest/databases/maintenance-window/) | string | Weekly window (UK time) for patching and maintenance. |
| [`masking`](/docs/manifest/databases/masking/) | map of names to null or string | Masking rules applied to database branches before they are attached (mandatory for special-category projects). |
| [`pooling`](/docs/manifest/databases/pooling/) | boolean | Put a connection pooler in front (Postgres). |
| [`public`](/docs/manifest/databases/public/) | object | Public access through the TCP proxy. |

\* required
