]> Raphaël G. Git Repositories - airbundle/commitdiff
Transform title in name and type
authorRaphaël Gertz <git@rapsys.eu>
Tue, 4 Oct 2022 07:47:14 +0000 (09:47 +0200)
committerRaphaël Gertz <git@rapsys.eu>
Tue, 4 Oct 2022 07:47:14 +0000 (09:47 +0200)
Resources/config/doctrine/Dance.orm.yml

index e1cba845a5dbf10b1712e41057fa141e3002ed48..0d241cc153545cc065315095c3e8db83993857c7 100644 (file)
@@ -10,7 +10,10 @@ Rapsys\AirBundle\Entity\Dance:
             options:
                 unsigned: true
     fields:
-        title:
+        name:
+            type: string
+            length: 32
+        type:
             type: string
             length: 32
         created:
@@ -25,5 +28,8 @@ Rapsys\AirBundle\Entity\Dance:
         users:
             targetEntity: Rapsys\AirBundle\Entity\User
             mappedBy: dances
+    uniqueConstraints:
+        name_type:
+            columns: [ name, type ]
     lifecycleCallbacks:
         preUpdate: ['preUpdate']