-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
Add ability to exclude tables from purge in ORM #225
Conversation
# Conflicts: # lib/Doctrine/Common/DataFixtures/Purger/ORMPurger.php
@@ -133,11 +142,15 @@ public function purge() | |||
} | |||
|
|||
$connection = $this->em->getConnection(); | |||
$filterExpr = $connection->getConfiguration()->getFilterSchemaAssetsExpression(); | |||
$efe = empty($filterExpr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does efe
mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty filter expression
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not abbreviate then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, i changed the variable name and added tests for exclusion using the filter expression or the explicit exclusion list.
What I was trying to say was that because the filter schema option is available in the connection configuration, you won't see any of the tables that are filtered out by the connection. Thus there is no point in adding that feature in all the app that use doctrine. It's already there. |
The is filter expression regexp is used during create schema operations not during query's. |
The idea for using the filter expression regexp is that if tables/views should not be considered during schema creation they also should not be considered during schema purge. As an example i use |
# Conflicts: # lib/Doctrine/Common/DataFixtures/Purger/ORMPurger.php
@YaoOcelotl Thanks |
Tests for the filter schema expression if present in the DBAL connection and checks is the table name has been explicitly excluded.