From c32e0f942b71c6e0e556da3dfea8bd3eb91649f7 Mon Sep 17 00:00:00 2001 From: Tom H Anderson Date: Thu, 8 Jun 2023 19:07:22 -0600 Subject: [PATCH] @ittmann fix from https://github.com/doctrine/DoctrineORMModule/pull/731 for 6.0.x --- docs/en/configuration.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/en/configuration.rst b/docs/en/configuration.rst index b15da06b..bf445ec7 100644 --- a/docs/en/configuration.rst +++ b/docs/en/configuration.rst @@ -293,7 +293,8 @@ module. How to Exclude Tables from a Schema Diff ---------------------------------------- -The "schema_assets_filter" option can be used to exclude certain tables from being created or deleted in a schema update: +The "schema_assets_filter" option can be used to exclude certain tables from being deleted in a schema update. +It should be set with a filter callback that will receive the table name and should return `false` for any tables that must be excluded and `true` for any other tables. .. code:: php @@ -302,7 +303,7 @@ The "schema_assets_filter" option can be used to exclude certain tables from bei 'configuration' => [ 'orm_default' => [ 'schema_assets_filter' => fn (string $tableName): bool => ( - in_array($tableName, ['migrations', 'doNotRemoveThisTable']); + ! in_array($tableName, ['doNotRemoveThisTable', 'alsoDoNotRemoveThisTable']) ), ], ],