diff --git a/source/bundles/person.rst b/source/bundles/person.rst index 0a5640bd4..f4199e52f 100644 --- a/source/bundles/person.rst +++ b/source/bundles/person.rst @@ -222,5 +222,12 @@ Move all the entities associated to a person onto another one, and remove the ol It is advised to run first the command with the :code:`dump-sql` option and, then, use the :code:`force` option. +The moving and suppression is executed inside a transaction, ensuring no data loss if the migration fails. +.. note:: + Using bash and awk, it is easy to use a TSV file (values separated by a tab, not a comma) to create move commands. Assuming our file is named :code:`twins.tsv` and contains two columns: the first one with :code:`from` ids, and the second one with :code:`to` ids: + + .. code-block:: bash + + awk '{ print "php app/console chill:person:move --dump-sql --from " $1 " --to " $2;}' twins.tsv