add tips for using chill:person:move

This commit is contained in:
Julien Fastré 2019-06-12 14:18:56 +02:00
parent 78910af913
commit 5f4c15667c

View File

@ -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