---
title: "Preview what deploying would change about the schema"
method: GET
path: "/sites/{id}/db/schema/plan"
tags: ["Sites"]
---

# Preview what deploying would change about the schema

`GET /sites/{id}/db/schema/plan`

## Request

- Base URL: `https://api.crevio.co/v1`
- URL: `https://api.crevio.co/v1/sites/{id}/db/schema/plan`
- Auth: API key in header `Authorization`

The difference between the development database and the live one, described before it is applied — the statements, what they mean in plain language, and whether anything would be lost. Nothing runs. Show this to the user before deploying: a schema change that only becomes visible once it has happened is one nobody gets to object to.

## Path parameters

- `id` string, required

## Response `200`

Planned schema change

- object
  - `object` string
  - `up_to_date` boolean: The live database already matches; deploying would change nothing.
  - `summary` string[]: What the change means, in language a non-technical merchant can act on.
  - `statements` string[]: The DDL that would run.
  - `notes` string[]: Anything that would be removed or rebuilt.
  - `destructive` boolean
  - `sql` string, nullable

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `404`: Resource not found
- `429`: Rate limit exceeded — 600 requests per minute per credential. Retry after the number of seconds in `Retry-After`.

---

[API](https://skmtc.dev/crevio/apis/crevio-api-v1.md) · [All operations](https://skmtc.dev/crevio/apis/crevio-api-v1/llms.txt) · [OpenAPI document](https://skmtc.dev/crevio/apis/crevio-api-v1/revisions/2219f18ad651?raw)
