fix: Add username idx (#11918)

* Add index on 'users.username'

* Bring back fields that are in main
pull/11926/head
Alex van Andel 2023-10-16 18:21:01 +01:00 committed by GitHub
parent f2ecd9818a
commit a02dcf485f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -0,0 +1,2 @@
-- CreateIndex
CREATE INDEX "users_username_idx" ON "users"("username");

View File

@ -253,6 +253,7 @@ model User {
@@unique([email])
@@unique([email, username])
@@unique([username, organizationId])
@@index([username])
@@index([emailVerified])
@@index([identityProvider])
@@index([identityProviderId])