From 121bbeb3a8e09d72256a27e49860bd7e17891d14 Mon Sep 17 00:00:00 2001 From: LucileDT Date: Mon, 15 May 2023 17:46:51 +0200 Subject: [PATCH] Add code example for purge exclusion (#389) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Grégoire Paris --- Resources/doc/index.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Resources/doc/index.rst b/Resources/doc/index.rst index ebbab61..3b7683c 100644 --- a/Resources/doc/index.rst +++ b/Resources/doc/index.rst @@ -302,7 +302,11 @@ By default all previously existing data is purged using ``DELETE FROM table`` st If you want to exclude a set of tables from being purged, e.g. because your schema comes with pre-populated, semi-static data, pass the option ``--purge-exclusions``. Specify ``--purge-exclusions`` multiple times to exclude -multiple tables. +multiple tables: + +.. code-block:: terminal + + $ php bin/console doctrine:fixtures:load --purge-exclusions=post_category --purge-exclusions=comment_type You can also customize purging behavior significantly more and implement a custom purger plus a custom purger factory::