supabase_apply_migration
Apply a named, tracked SQL migration to a Supabase project's database through the Management API, enabling versioned schema changes.
Instructions
Apply a named, tracked migration to a Supabase project's database via the Management API.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project_ref": "<project_ref>",
"name": "<name>",
"sql": "<sql>"
},
"name": "supabase_apply_migration"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | The migration SQL. | |
| name | Yes | Short snake_case migration name. | |
| api_key | No | Legacy token alias. | |
| project_ref | Yes | Supabase project ref. | |
| access_token | No | Optional Supabase access token. Omit to use the connected login. |