Many or multiple UniqueContraints in table definition in Dontrine/Symfony

in symfony •  7 years ago 
 @ORM\Table(
     schema="item_record",
     name="item_record",
     options={
         "charset":"utf8",
         "collate":"utf8_unicode_ci",
         "comment":"library record of a work",
         "temporary":false,
         "engine":"InnoDB"
     },
     indexes={
         @ORM\Index(name="ix_name", columns={"itemRecord_name"}),
         @ORM\Index(name="ix_name_publisher", columns={"itemRecord_publisherId","itemRecord_name"})
     },
     uniqueConstraints={
         @ORM\UniqueConstraint(name="ix_name_ean", columns={"itemRecord_name","eanId"}),
         @ORM\UniqueConstraint(name="ix_ean_publisher", columns={"itemRecord_publisherId","eanId"})
     }
 )
Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!