Set collation to utf8_bin in shortCode column of ShortUrl so that the UNIQUE key is case sensitive

This commit is contained in:
Alejandro Celaya 2016-07-21 18:46:15 +02:00
parent 95346ebb7e
commit 5c8353da02

View File

@ -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;
/**