migrations
migrations copied to clipboard
Ability to execute migration only once on the single node of a cluster
Now all migrations will execute on each node of the cluster.
I want to insert some initial data to some sharded space in a cluster (constants, configs etc). For example consider the following migration code:
return {
up = function()
crud.insert('dictionary', {1, box.NULL, 'en_ru', 'apple', 'яблоко'})
crud.insert('dictionary', {2, box.NULL, 'en_ru', 'tomato', 'томат'})
return true
end,
run_on_single_node = true
}
It seems that if such migration completes without errors it must be marked as 'EXECUTED' on all nodes.