---
title: "migration_failed: what it means and how to fix it · Hypamoon"
description: "HTTP 422. A migration from apply_app_migration (POST /api/v1/apps/{id}/migrations) reached the app's database but SQLite refused it, for example a..."
url: https://hypamoon.com/docs/errors/migration_failed
---

**Start for free.** [Sign up](https://app.hypamoon.com/?mode=signup&utm_source=docs&utm_campaign=banner) without a card and connect your chat, or create a test key for the API. Going live with something real asks for a quick check of your company first.

[Errors](https://hypamoon.com/docs/errors)

# migration\_failed

**Status**\
422

**Type**\
`https://hypamoon.com/docs/errors/migration_failed`

A migration from `apply_app_migration` (`POST /api/v1/apps/{id}/migrations`) reached the app's database but SQLite refused it, for example a syntax error, a table that already exists or a column that is missing. That migration was not applied at all: each migration runs as one batch, all or nothing. Migrations before it in the same call did apply; they are in `applied`. Fix the SQL and send it again under the same name (it was never recorded).

Hypamoon is the infrastructure your chat or agent builds on for a business. Hypamoon API, version 1.[hypamoon.com](https://hypamoon.com/)
