title: CLI Doctrine 2 - index already defined
body: <p>I'm trying to create my database with Doctrine 2 from my PHP entity.</p>
  
  <p>Here is my code from the class Team :</p>
  
  <pre><code>&lt;?php
  // Team.php
  /**
   * @Entity @Table(name="team")
   **/
  class Team
  {
      /**
       * @Id
       * @OneToOne(targetEntity="User")
       * @JoinColumn(name="userID", referencedColumnName="id")
       */
      protected $user;
  
      /**
       * @Column(type="string",length=30)
       * @var string
       **/
      protected $function;
  
      /**
       * @Column(type="text")
       * @var string
       **/
      protected $description;
  
      /**
       * @OneToOne(targetEntity="File")
       * @JoinColumn(name="fileID", referencedColumnName="id")
       */
      protected $img;
  
      /**
       * @OneToOne(targetEntity="File")
       * @JoinColumn(name="fileID", referencedColumnName="id")
       */
      protected $cv;
  
      /**
       * @Id
       * @OneToOne(targetEntity="Language")
       * @JoinColumn(name="languageID", referencedColumnName="id")
       */
      protected $lang;
  
      public function getUser()
      {
          return $this-&gt;user;
      }
  
      public function setUser(User $user)
      {
          $this-&gt;user = $user;
      }
  
      public function getFunction()
      {
          return $this-&gt;function;
      }
  
      public function setFunction($function)
      {
          $this-&gt;function = $function;
      }
  
      public function getDescription()
      {
          return $this-&gt;description;
      }
  
      public function setDescription($description)
      {
          $this-&gt;description = $description;
      }
  
      public function getImg()
      {
          return $this-&gt;img;
      }
  
      public function setImg($img)
      {
          $this-&gt;img = $img;
      }
  
      public function getCv()
      {
          return $this-&gt;cv;
      }
  
      public function setCv($cv)
      {
          $this-&gt;cv = $cv;
      }
  
      public function getLang()
      {
          return $this-&gt;lang;
      }
  
      public function setLang(Language $language)
      {
          $this-&gt;lang = $language;
      }
  }
  </code></pre>
  
  <p>And the error :</p>
  
  <pre><code>[Doctrine\DBAL\Schema\SchemaException]
  An index with name 'uniq_c4e0a61f93cb796c' was already defined on table 'team'
  </code></pre>
  
  <p>Doctrine is loaded from composer and used with Windows CMD (if that can help).</p>
  
  <p>I've seen that an issue has been reported for v.2.5.0 so I loaded 2.4.7 but same error, so I tried dev-master but still the same.</p>
  
  <p>I also tried removing the composite Id and replaced it by a simple generated @Id, or even none (Doctrine was then saying No identifier/primary key specified for Entity "Team").</p>
  
  <p>This code was working with v.2.4.2 but the point is to update the tools used for this project.</p>
  
  <p>Do somebody know how I could do this ?</p>