Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@ittmann fix from https://github.com/doctrine/DoctrineORMModule/pull/731 #739

Merged
merged 1 commit into from
Jun 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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