Skip to content
This repository has been archived by the owner on Apr 8, 2018. It is now read-only.

Commit

Permalink
Added information about ignoring custom tables
Browse files Browse the repository at this point in the history
  • Loading branch information
peterrehm committed Aug 20, 2014
1 parent 7a7db20 commit 424a466
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions en/reference/generating_migrations.rst
Expand Up @@ -74,3 +74,23 @@ The SQL generated here is the exact same SQL that would be executed if you were
using the `orm:schema-tool` task and the `--update` option. This just allows you to
capture that SQL and maybe tweak it or add to it and trigger the deployment
later across multiple database servers.

Ignoring custom Tables
======================

If you have custom tables which are not managed by doctrine you might face the situation
that with every diff task you are executing you get the remove statements for those tables
added to the migration class.

Therefore you can configure doctrine with a schema filter.

$connection->getConfiguration()->setFilterSchemaAssetsExpression("~^(?!t_)~");

With this expression all tables prefixed with t_ will ignored by the schema tool.

If you use the DoctrineBundle with Symfony2 you can set the schema_filter option
in your configuration. You can find more information in the documentation of the
DoctrineMigationsBundle.



0 comments on commit 424a466

Please sign in to comment.