Skip to content
Select themeSelect language

`POST /api/apps/{id}/migrations` -- record a new migration and apply every pending migration. Idempotent: re-uploading the same `(name, sql)` is a no-op (the stored checksum matches). Re-uploading the same name with new content surfaces a 400; rename the file to register a follow-up.

POST
/api/apps/{id}/migrations
curl --request POST \
--url https://example.com/api/apps/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/migrations \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "sql": "example" }'
id
required
string format: uuid
Media typeapplication/json
object
name
required
string
sql
required
string
Examplegenerated
{
"name": "example",
"sql": "example"
}
Media typeapplication/json

What apply_pending_migrations returns – a per-migration verdict plus the App’s schema name for surface to the UI.

object
applied
required
Array<string>
schema
required
string
skipped_already_applied
required
Array<string>
Examplegenerated
{
"applied": [
"example"
],
"schema": "example",
"skipped_already_applied": [
"example"
]
}