db
db delete
Permanently destroy a database.
destructive--dry-run
Destroys the instance and everything inside it. There is no snapshot and no retention window, so take a dump first if the data matters.
Applications keep whatever connection string they were given. Nothing here updates them, and they fail on their next connection.
Usage
outplane db delete <DATABASE> [flags]Arguments
| Argument | Type | Description |
|---|---|---|
DATABASE | string | Database name or id. Required. |
Flags
| Flag | Type | Description |
|---|---|---|
-y, --yes | bool | Acknowledge the deletion. Not sufficient on its own. |
--confirm-name | string | The database's name, typed again. |
The global flags apply as well.
Output
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
status | string | Only active accepts connections. provisioning means the provider has not finished. One of provisioning, active, failed, deleting. |
version | string | PostgreSQL major version. |
region | string | Fixed at creation. |
size | string | null | The provider's compute unit, such as 0.25-1. Not a platform instance code. |
createdAt | string | null | RFC 3339, UTC. |
changed | bool |
Examples
See what would go
outplane db delete orders --dry-runCheck what the name resolves to first
outplane db delete orders --dry-run --json --fields db,dbIdThe confirmed form
outplane db delete orders --yes --confirm-name ordersWhat to Know
- Never prompts. Without confirmation it exits 4 and returns the command to replay in the error's confirm_command field.
- Under a detected agent harness it exits 4 even with both flags.
- Applications keep whatever connection string they were given. Nothing here updates them, and they will fail on their next connection.
- Irreversible. Take a dump first if the data matters.
Errors
Beyond 0 for success, this command exits with:
| Exit | Kind | Meaning |
|---|---|---|
2 | usage | Invalid arguments, unknown flag, or client-side validation failure. |
3 | auth | Not authenticated, token revoked or expired, or forbidden for this team. |
4 | confirmation_required | A destructive operation stopped. Replay the command in confirm_command. |
5 | not_found | The named resource does not exist, or is not visible to this credential. |
8 | upstream | The Out Plane API returned a server error. |
The code on the error object is one of confirmation.required, db.confirm_name_mismatch, db.not_found. Branch on that, or on the exit status. The message is prose and changes.