# SQL DDL Compatibility Checker

> SQL DDL Compatibility Checker is a paid API for AI agents from api.zfinia.com, paid per call via x402, $0.28/call, status unknown (last checked 2026-10-11).

Compares two SQL schema snapshots and identifies breaking changes for readers, writers, or both, including dropped columns, type narrowing, nullability flips, and more.

## Facts

- Endpoint: POST https://api.zfinia.com/x402/v1/sql-ddl-compatibility?utm_source=zero.xyz
- Price: $0.28/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sql-ddl-compatibility-checker-8d265518
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_61NH__yG26mD2R2hK4jzY

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability sql-ddl-compatibility-checker-8d265518 -d '<json body>'
```

Example prompt: Check if our schema migration will break anything — here's the old DDL and the new DDL, and I need to know about breakage for both readers and writers.

## When to prefer this

Choose this endpoint when you need a semantic, role-aware breakdown of SQL schema breaking changes — specifically when you need to distinguish between what breaks readers vs writers. It goes beyond simple diffs by interpreting the migration impact on client behavior, making it ideal for CI/CD gates, migration review workflows, or API contract validation.

## Known failure modes

- Invalid or unparseable SQL DDL in before/after fields returns a parse error
- Exceeding the 262144 character limit per schema field returns a payload-too-large error
- Missing required 'before' or 'after' fields returns a validation error
- Payment failure or insufficient USDC balance returns a 402 error
- Unsupported SQL dialect syntax may not be fully analyzed

## How this service works

Compare two SQL schema snapshots and report what would break a client written against the first. Separates reader breakage from writer breakage, because the same change breaks different people: a dropped column breaks whoever selects it, a new NOT NULL column with no default breaks every existing insert. Also reports narrowed and widened types, lost defaults, nullability flips, collation changes and added or removed uniqueness.

## Output

A structured report listing breaking changes separated by reader impact and writer impact, including: dropped columns, type narrowing or widening, lost default values, nullability flips, collation changes, and added or removed uniqueness constraints. Each change is classified by which role (readers, writers, or both) it affects.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "role": {
   "enum": [
    "readers",
    "writers",
    "both"
   ],
   "type": "string"
  },
  "after": {
   "type": "string",
   "maxLength": 262144
  },
  "before": {
   "type": "string",
   "maxLength": 262144
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sql-ddl-compatibility-checker-8d265518/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.zfinia.com](https://www.zero.xyz/host/api.zfinia.com/llms.txt)
