title: doctrine migrations bundle and postgres schema: diff does not work properly
body: <p>I'm using <em>doctrine</em> in my Symfony project, by connecting to an already existent postgres database.</p>
  
  <p>The DB has several schemas, but the symfony app will use nothing but its own schema. The first <code>Entity</code> class I created is the following one:</p>
  
  <pre><code>namespace Belka\TestBundle\Entity;
  
  use Doctrine\ORM\Mapping as ORM;
  
  /**
   * @ORM\Entity
   * @ORM\Table(name="app_auth.User", schema="app_auth")
   */
  class User {
      /**
       * @ORM\Column(type="string")
       * @ORM\Id
       * @ORM\GeneratedValue(strategy="NONE")
       */
      private $username;
  
      /**
       * @ORM\Column(type="string")
       */
      private $email;
  
      /**
       * @ORM\Column(type="string")
       */
      private $password;
  }
  </code></pre>
  
  <p>as you can see, the <code>Entity</code> is specifying its own schema <code>app_auth</code>. 
  Next, I tried to use the <em>migrations bundle</em>. So, I installed and configured it, in order not to consider anything but my schema:</p>
  
  <p>Extract of <code>config.yml</code>:</p>
  
  <pre><code>doctrine:
      dbal:
          driver:   "%database_driver%"
          host:     "%database_host%"
          port:     "%database_port%"
          dbname:   "%database_name%"
          user:     "%database_user%"
          password: "%database_password%"
          charset:  UTF8
          schema_filter: ~^app_auth\..*~
  </code></pre>
  
  <p>Extract of <code>config_dev.yml</code>:</p>
  
  <pre><code>doctrine_migrations:
      dir_name: "%kernel.root_dir%/../.container/update/DoctrineMigrations"
      namespace: Application\Migrations
      table_name: "app_auth.migration_versions"
      name: Application Migrations
  </code></pre>
  
  <p>And I run the diff:</p>
  
  <pre><code>php app/console doctrine:migrations:diff
  </code></pre>
  
  <p>Unfortunately, the <em>migration class</em> generated is the following one:</p>
  
  <pre><code>namespace Application\Migrations;
  
  use Doctrine\DBAL\Migrations\AbstractMigration;
  use Doctrine\DBAL\Schema\Schema;
  
  /**
   * Auto-generated Migration: Please modify to your needs!
   */
  class Version20160422171409 extends AbstractMigration
  {
      /**
       * @param Schema $schema
       */
      public function up(Schema $schema)
      {
          // this up() migration is auto-generated, please modify it to your needs
  
      }
  
      /**
       * @param Schema $schema
       */
      public function down(Schema $schema)
      {
          // this down() migration is auto-generated, please modify it to your needs
          $this-&gt;abortIf($this-&gt;connection-&gt;getDatabasePlatform()-&gt;getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
  
          $this-&gt;addSql('CREATE SCHEMA app_auth');
      }
  }
  </code></pre>
  
  <p>what's wrong with my configuration then?</p>