Explorar el Código

Add unique constraint to the tag table

Jordi Boggiano hace 12 años
padre
commit
c1bfda6107
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      src/Packagist/WebBundle/Entity/Tag.php

+ 4 - 1
src/Packagist/WebBundle/Entity/Tag.php

@@ -19,7 +19,10 @@ use Doctrine\ORM\EntityManager;
 
 /**
  * @ORM\Entity
- * @ORM\Table(name="tag")
+ * @ORM\Table(
+ *     name="tag",
+ *     uniqueConstraints={@ORM\UniqueConstraint(name="name_idx", columns={"name"})}
+ * )
  * @author Jordi Boggiano <j.boggiano@seld.be>
  */
 class Tag