Skip to content

Commit 18eac30

Browse files
committed
Merge pull request #276 from ArteGEIE/feature/mongo-indexes
Add index on mongo documents
2 parents 414f0e1 + 6d44c97 commit 18eac30

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Resources/config/doctrine/AccessToken.mongodb.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping.xsd">
66

77
<mapped-superclass name="FOS\OAuthServerBundle\Document\AccessToken">
8-
<field name="token" fieldName="token" type="string" />
8+
<field name="token" fieldName="token" type="string" unique="true" />
99
<field name="expiresAt" fieldName="expiresAt" type="int" nullable="true" />
1010
<field name="scope" fieldName="scope" type="string" nullable="true" />
1111
</mapped-superclass>

Resources/config/doctrine/AuthCode.mongodb.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping.xsd">
66

77
<mapped-superclass name="FOS\OAuthServerBundle\Document\AuthCode">
8-
<field name="token" fieldName="token" type="string" />
8+
<field name="token" fieldName="token" type="string" unique="true" />
99
<field name="redirectUri" fieldName="redirectUri" type="string" />
1010
<field name="expiresAt" fieldName="expiresAt" type="int" nullable="true" />
1111
<field name="scope" fieldName="scope" type="string" nullable="true" />

Resources/config/doctrine/RefreshToken.mongodb.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping.xsd">
66

77
<mapped-superclass name="FOS\OAuthServerBundle\Document\RefreshToken">
8-
<field name="token" fieldName="token" type="string" />
8+
<field name="token" fieldName="token" type="string" unique="true" />
99
<field name="expiresAt" fieldName="expiresAt" type="int" nullable="true" />
1010
<field name="scope" fieldName="scope" type="string" nullable="true" />
1111
</mapped-superclass>

0 commit comments

Comments
 (0)