---
title: "Switch the tables of one storage engine to another"
method: POST
path: "/api/clusters/{clusterName}/actions/alter-engine"
tags: ["ClusterActions"]
---

# Switch the tables of one storage engine to another

`POST /api/clusters/{clusterName}/actions/alter-engine`

## Request

- The document declares no server URL.
- Auth: none declared. Required headers: `Authorization`

Plans (confirm false) or runs (confirm true) ALTER TABLE ... ENGINE=engineTo on the master for every user table on engineFrom, optionally of one schema; binlog on, the replicas follow. Tables of any other engine (Aria, MEMORY, MyISAM...) are not touched; a table engineTo cannot hold (a foreign key, only InnoDB enforces them) is skipped with its reason. engineTo must be available on the master. Runs in the background, one table at a time, stopping at the first error: progress CINF0015, stop WARN0240. Needs db-optimize.

## Path parameters

- `clusterName` string, required

## Headers

- `Authorization` string, required

## Request body

- ServerEngineSwitchRequest
  - `confirm` boolean
  - `engineFrom` string
  - `engineTo` string
  - `schema` string: optional: one schema only

## Response `200`

The plan (confirm false)

- ClusterEngineSwitchPlan
  - `cluster` string
  - `engineFrom` string
  - `engineTo` string
  - `notes` string[]
  - `schema` string
  - `server` string
  - `skipped` ClusterEngineSwitchTable[]
    - `bytes` integer: data + indexes, as information_schema reports them
    - `engine` string
    - `foreignKey` boolean: a foreign key references this table or is declared on it
    - `reason` string
    - `schema` string
    - `table` string
  - `tables` ClusterEngineSwitchTable[]
    - `bytes` integer: data + indexes, as information_schema reports them
    - `engine` string
    - `foreignKey` boolean: a foreign key references this table or is declared on it
    - `reason` string
    - `schema` string
    - `table` string
  - `totalBytes` integer

## Other responses

- `202`: Switch started (confirm true)
- `400`: Refused: the reason (engine not available, a switch running, nothing to alter...)
- `403`: No valid ACL
- `404`: No cluster

## Changes

- **2026-10-12** `218457e8f748`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/signal18/apis/signal-18-dashboard-api/changes/api/clusters/:clusterName/actions/alter-engine/post.md)

---

[API](https://skmtc.dev/signal18/apis/signal-18-dashboard-api.md) - [All operations](https://skmtc.dev/signal18/apis/signal-18-dashboard-api/llms.txt) - [OpenAPI document](https://skmtc.dev/signal18/apis/signal-18-dashboard-api/revisions/8ee8a1e31294?raw)
