From 5c8353da02d150abc0196a7a9ae4ccf72f233c51 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Thu, 21 Jul 2016 18:46:15 +0200 Subject: [PATCH] Set collation to utf8_bin in shortCode column of ShortUrl so that the UNIQUE key is case sensitive --- module/Core/src/Entity/ShortUrl.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/module/Core/src/Entity/ShortUrl.php b/module/Core/src/Entity/ShortUrl.php index b1f524bc..f7b42895 100644 --- a/module/Core/src/Entity/ShortUrl.php +++ b/module/Core/src/Entity/ShortUrl.php @@ -23,7 +23,14 @@ class ShortUrl extends AbstractEntity implements \JsonSerializable protected $originalUrl; /** * @var string - * @ORM\Column(name="short_code", type="string", nullable=false, length=10, unique=true) + * @ORM\Column( + * name="short_code", + * type="string", + * nullable=false, + * length=10, + * unique=true, + * options={"collation": "utf8_bin"} + * ) */ protected $shortCode; /**