Add unique constraint (class, id) to notifications

This commit is contained in:
Marc Ducobu 2021-06-15 11:23:43 +02:00
parent 84913553e8
commit a258905c59

View File

@ -27,7 +27,12 @@ use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=NotificationRepository::class)
* @ORM\Table(name="chill_main_notification")
* @ORM\Table(
* name="chill_main_notification",
* uniqueConstraints={
* @ORM\UniqueConstraint(columns={"relatedEntityClass", "relatedEntityId"})
* }
* )
*/
class Notification
{