@@ -389,12 +389,19 @@ public static void createTablesIfNotExists(Start start, Connection con) throws S
389389 if (!doesTableExists (start , con , Config .getConfig (start ).getEmailPasswordUsersTable ())) {
390390 getInstance (start ).addState (CREATING_NEW_TABLE , null );
391391 update (con , EmailPasswordQueries .getQueryToCreateUsersTable (start ), NO_OP_SETTER );
392+
393+ // index
394+ update (con , EmailPasswordQueries .getQueryToCreateEmailPasswordUsersEmailIndex (start ), NO_OP_SETTER );
392395 }
393396
394397 if (!doesTableExists (start , con , Config .getConfig (start ).getEmailPasswordUserToTenantTable ())) {
395398 getInstance (start ).addState (CREATING_NEW_TABLE , null );
396399 update (con , EmailPasswordQueries .getQueryToCreateEmailPasswordUserToTenantTable (start ),
397400 NO_OP_SETTER );
401+
402+ // index
403+ update (con , EmailPasswordQueries .getQueryToCreateEmailPasswordUserToTenantEmailIndex (start ),
404+ NO_OP_SETTER );
398405 }
399406
400407 if (!doesTableExists (start , con , Config .getConfig (start ).getPasswordResetTokensTable ())) {
@@ -432,6 +439,9 @@ public static void createTablesIfNotExists(Start start, Connection con) throws S
432439 if (!doesTableExists (start , con , Config .getConfig (start ).getThirdPartyUserToTenantTable ())) {
433440 getInstance (start ).addState (CREATING_NEW_TABLE , null );
434441 update (con , ThirdPartyQueries .getQueryToCreateThirdPartyUserToTenantTable (start ), NO_OP_SETTER );
442+
443+ // index
444+ update (con , ThirdPartyQueries .getQueryToCreateThirdPartyUserToTenantThirdPartyUserIdIndex (start ), NO_OP_SETTER );
435445 }
436446
437447 if (!doesTableExists (start , con , Config .getConfig (start ).getJWTSigningKeysTable ())) {
@@ -451,12 +461,19 @@ public static void createTablesIfNotExists(Start start, Connection con) throws S
451461 update (con , getQueryToCreateUserIdAppIdIndexForUsersTable (start ), NO_OP_SETTER );
452462 update (con , getQueryToCreateAppIdIndexForUsersTable (start ), NO_OP_SETTER );
453463 update (con , getQueryToCreateTenantIdIndexForUsersTable (start ), NO_OP_SETTER );
464+
465+ update (con , PasswordlessQueries .getQueryToCreatePasswordlessUsersEmailIndex (start ), NO_OP_SETTER );
466+ update (con , PasswordlessQueries .getQueryToCreatePasswordlessUsersPhoneNumberIndex (start ), NO_OP_SETTER );
454467 }
455468
456469 if (!doesTableExists (start , con , Config .getConfig (start ).getPasswordlessUserToTenantTable ())) {
457470 getInstance (start ).addState (CREATING_NEW_TABLE , null );
458471 update (con , PasswordlessQueries .getQueryToCreatePasswordlessUserToTenantTable (start ),
459472 NO_OP_SETTER );
473+
474+ // index
475+ update (con , PasswordlessQueries .getQueryToCreatePasswordlessUserToTenantEmailIndex (start ), NO_OP_SETTER );
476+ update (con , PasswordlessQueries .getQueryToCreatePasswordlessUserToTenantPhoneNumberIndex (start ), NO_OP_SETTER );
460477 }
461478
462479 if (!doesTableExists (start , con , Config .getConfig (start ).getPasswordlessDevicesTable ())) {
0 commit comments