Tarantool CE/EE Documentation portal logo
Support
Updated at July 17, 2026   02:08 PM

Performing migrations

Тarantool Cluster Manager provides a web interface for managing and performing migrations in connected clusters. To learn more about migrations in Tarantool, see migrations.

Migrations are named Lua files with code that alters the cluster data schema, for example, creates a space, changes its format, or adds indexes. In TCM, there is a dedicated page where you can organize migrations, edit their code, and apply them to the cluster.

Managing migrations

The tools for managing migrations from TCM are located on the Cluster > Migrations page.

To create a migration:

  1. Click Add (the + icon) on the Migrations page.

  2. Enter the migration name.

  3. Write the migration code in the editor window. Use the box.schema module reference to learn how to work with Tarantool data schema.

Once you complete writing the migration, save it by clicking Save. This saves the migration that is currently opened in the editor.

Appliyng migrations

After you prepare a set of migrations, apply it to the cluster. To apply all saved migrations to the cluster at once, click Apply.

Migrations that were created but not saved yet are not applied when you click Apply.

Checking migrations status

To check the migration results on the cluster, use the Migrated widget on the cluster stateboard. It reflects the general result of the last applied migration set:

  • If all saved migration are applied successfully, the widget is green.
  • If any migration from this set fails on certain instances, the widget color changes to yellow.
  • If there are saved migrations that are not applied yet, the widget becomes gray.

Hovering a cursor over the widget shows the number of instances on which the currently saved migration set is successfully applied.

You can also check the status of each particular migration on the Migrations page. The migrations that are successfully applied are marked with green check marks. Failed migrations are marked with exclamation mark icons (!). Hover the cursor over the icon to see the information about the error. To reapply a failed migration, click Force apply in the pop-up with the error information.

Migration file example

The following migration code creates a formatted space with two indexes in a sharded cluster:

local function apply_scenario()    local space = box.schema.space.create('customers')    space:format {        { name = 'id',        type = 'number' },        { name = 'bucket_id', type = 'number' },        { name = 'name',      type = 'string' },    }    space:create_index('primary', { parts = { 'id' } })    space:create_index('bucket_id', { parts = { 'bucket_id' }, unique = false })endreturn {    apply = {        scenario = apply_scenario,    },}