Closed ittmann closed 1 year ago
A description about what to expect on true and false would be insightful. Something like "If the function returns true, then..."
My intent with this PR was to fix the documentation error. Documentation should probably be added to the DBAL Configuration documentation and/or Configuration class
With the latest package versions (dbal 3.5.3 and migrations 3.5.5) adding the 'migrations' table to the asset filter breaks doctrine migrations (and not adding it makes the schema-tool when run with the the "--complete" option drop the table)
Adding a table to the schema_asset_filter will not prevent an entity table from being created, only tables not owned by the DBAL from being dropped, I changed this in the first line.
Also I added some explanation on how the schema_assets_filter works and removed the 'migrations' table from the example as adding it to the asset filter currently breaks doctrine migrations.
With the latest package versions (dbal 3.5.3 and migrations 3.5.5) adding the 'migrations' table to the asset filter breaks doctrine migrations (and not adding it makes the schema-tool when run with the the "--complete" option drop the table)
Opened issue https://github.com/doctrine/migrations/issues/1317 Adding the migrations table to doctrine (dbal) schema assets filter breaks migrations
The callable set as schemaAssetsFilter should return false for tables that you want filtered out
See for example https://github.com/doctrine/dbal/blob/3.6.x/src/Configuration.php#L168 and https://github.com/doctrine/dbal/blob/4.0.x/src/Schema/AbstractSchemaManager.php#L204