Support for regex in schema tool filter
This commit is contained in:
@@ -57,7 +57,11 @@ class EntityManagerFactory
|
||||
if ($skip_names_in_schema_tool) {
|
||||
$connection->getConfiguration()->setSchemaAssetsFilter(function (AbstractNamedObject|string $object) use ($skip_names_in_schema_tool) {
|
||||
$object_name = is_string($object) ? $object : $object->getObjectName()->toString();
|
||||
return !in_array($object_name, $skip_names_in_schema_tool);
|
||||
foreach ($skip_names_in_schema_tool as $name) {
|
||||
if (preg_match("/$name/", $object_name)) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user