-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add index on publicKeyCredentialId in Doctrine mapping #670
Conversation
<indexes> | ||
<index name="pkcid_idx" columns="publicKeyCredentialId"/> | ||
</indexes> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about making it a unique column instead? That already gives it an index, plus it guarantees it's unique.
Marked the publicKeyCredentialId field as unique in the PublicKeyCredentialSource mapping configuration. This ensures database-level enforcement of uniqueness for this field, preventing duplicate entries.
eb36430
to
8640216
Compare
Marked the publicKeyCredentialId field as unique in the PublicKeyCredentialSource mapping configuration. This ensures database-level enforcement of uniqueness for this field, preventing duplicate entries.
I just deployed this to production via
I'm using MySQL. |
Hello @nicodemuz, This should be fixed in 5.1.1 |
@Spomky The MySQL query becomes now:
With an error:
I just tested that it (doctrine:schema:update) works with:
But I'm not sure if this will break anything. |
This commit introduces a database index on the
publicKeyCredentialId
field in thePublicKeyCredentialSource
mapping. The added index aims to optimize query performance for operations involving this column.Target branch: 5.1.x
Resolves issue #665