From 5f4c15667c0796b1e65ee9153efbd713371cd199 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 12 Jun 2019 14:18:56 +0200 Subject: [PATCH] add tips for using chill:person:move --- source/bundles/person.rst | 7 +++++++ 1 file changed, 7 insertions(+) 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