title: Doctrine\DBAL\Schema\SchemaException - There is no column with name 'brand_id' on table 'clients'
body: <p>I'm setting up a Symfony2 app and am trying to use Doctrine migrations. In this specific instance, I'm trying to add a new table, clients, for an entity, client, that I just created. This table does not exist in any form right now in the database.</p>
  
  <p>When I run php app/console doctrine:migrations:diff, I get the following error:</p>
  
  <pre><code>[Doctrine\DBAL\Schema\SchemaException]                       
  There is no column with name 'brand_id' on table 'clients'
  </code></pre>
  
  <p>Of course there is no column with that name, the table doesn't exist yet!</p>
  
  <p>Shouldn't Doctrine recognize that there is no table and create it? For reference, here's my entity:</p>
  
  <pre><code>&lt;?php
  
  namespace RandomBundle\Entity;
  
  use Doctrine\ORM\Mapping as ORM;
  
  /**
   * Client
   *
   * @ORM\Table(name="clients", indexes={@ORM\Index(name="brand_id", columns={"brand_id"})})
   * @ORM\Entity
   * @ORM\HasLifecycleCallbacks
   */
  class Client
  {
      /**
       * @var integer
       *
       * @ORM\Column(name="id", type="integer")
       * @ORM\Id
       * @ORM\GeneratedValue(strategy="IDENTITY")
       */
      private $id;
  
      /**
       * @var string
       *
       * @ORM\Column(name="name", type="string", length=255, nullable=false)
       */
      private $name;
  
      /**
       * @var \RandomBundle\Entity\Brand
       *
       * @ORM\ManyToOne(targetEntity="RandomBundle\Entity\Brand")
       * @ORM\JoinColumns({
       *   @ORM\JoinColumn(name="brand_id", referencedColumnName="id")
       * })
       */
      private $brand;
  
      /**
       * @var \RandomBundle\Entity\Project
       *
       * @ORM\OneToMany(targetEntity="RandomBundle\Entity\Project", mappedBy="client")
       */
      private $projects;
  
      /**
       * @var \DateTime
       *
       * @ORM\Column(name="updated_at", type="datetime", nullable=false)
       */
      private $updatedAt;
      /**
       * Constructor
       */
      public function __construct()
      {
          $this-&gt;projects = new \Doctrine\Common\Collections\ArrayCollection();
      }
  
      /**
       * Get id
       *
       * @return integer 
       */
      public function getId()
      {
          return $this-&gt;id;
      }
  
      /**
       * Set name
       *
       * @param string $name
       * @return Client
       */
      public function setName($name)
      {
          $this-&gt;name = $name;
  
          return $this;
      }
  
      /**
       * Get name
       *
       * @return string 
       */
      public function getName()
      {
          return $this-&gt;name;
      }
  
      /**
       * Set updatedAt
       *
       * @param \DateTime $updatedAt
       * @return Client
       */
      public function setUpdatedAt($updatedAt)
      {
          $this-&gt;updatedAt = $updatedAt;
  
          return $this;
      }
  
      /**
       * Get updatedAt
       *
       * @return \DateTime 
       */
      public function getUpdatedAt()
      {
          return $this-&gt;updatedAt;
      }
  
      /**
       * Set brand
       *
       * @param \Ripplr3\RipplrBundle\Entity\Brand $brand
       * @return Client
       */
      public function setBrand(\RandomBundle\Entity\Brand $brand = null)
      {
          $this-&gt;brand = $brand;
  
          return $this;
      }
  
      /**
       * Get brand
       *
       * @return \RandomBundle\Entity\Brand 
       */
      public function getBrand()
      {
          return $this-&gt;brand;
      }
  
      /**
       * Add projects
       *
       * @param \RandomBundle\Entity\Project $projects
       * @return Client
       */
      public function addProject(\RandomBundle\Entity\Project $projects)
      {
          $this-&gt;projects[] = $projects;
  
          return $this;
      }
  
      /**
       * Remove projects
       *
       * @param \RandomBundle\Entity\Project $projects
       */
      public function removeProject(\RandomBundle\Entity\Project $projects)
      {
          $this-&gt;projects-&gt;removeElement($projects);
      }
  
      /**
       * Get projects
       *
       * @return \Doctrine\Common\Collections\Collection 
       */
      public function getProjects()
      {
          return $this-&gt;projects;
      }
  }
  </code></pre>