Skip to content

Commit

Permalink
Merge pull request #739 from TomHAnderson/docs/schema_assets_filter
Browse files Browse the repository at this point in the history
@ittmann fix from #731
  • Loading branch information
greg0ire authored Jun 9, 2023
2 parents 97d2321 + c32e0f9 commit 0575181
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/en/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'])
),
],
],
Expand Down

0 comments on commit 0575181

Please sign in to comment.