Skip to content

Commit 64254d4

Browse files
committed
Merge pull request #170 from patrickli/index-on-tables
Add unique constraints on token fields for Doctrine ORM
2 parents 8152cf1 + 93717ed commit 64254d4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Resources/doc/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ use Doctrine\ORM\Mapping as ORM;
140140

141141
/**
142142
* @ORM\Entity
143+
* @ORM\Table(uniqueConstraints={@ORM\UniqueConstraint(columns={"token"})})
143144
*/
144145
class AccessToken extends BaseAccessToken
145146
{
@@ -174,6 +175,7 @@ use Doctrine\ORM\Mapping as ORM;
174175

175176
/**
176177
* @ORM\Entity
178+
* @ORM\Table(uniqueConstraints={@ORM\UniqueConstraint(columns={"token"})})
177179
*/
178180
class RefreshToken extends BaseRefreshToken
179181
{
@@ -208,6 +210,7 @@ use Doctrine\ORM\Mapping as ORM;
208210

209211
/**
210212
* @ORM\Entity
213+
* @ORM\Table(uniqueConstraints={@ORM\UniqueConstraint(columns={"token"})})
211214
*/
212215
class AuthCode extends BaseAuthCode
213216
{

0 commit comments

Comments
 (0)