diff --git a/connections/mongo-update/src/main/java/org/keycloak/connections/mongo/updater/impl/updates/Update1_2_0_RC1.java b/connections/mongo-update/src/main/java/org/keycloak/connections/mongo/updater/impl/updates/Update1_2_0_RC1.java index 227a1518ff..c980067237 100644 --- a/connections/mongo-update/src/main/java/org/keycloak/connections/mongo/updater/impl/updates/Update1_2_0_RC1.java +++ b/connections/mongo-update/src/main/java/org/keycloak/connections/mongo/updater/impl/updates/Update1_2_0_RC1.java @@ -34,6 +34,10 @@ public class Update1_2_0_RC1 extends Update { DBCollection roles = db.getCollection("roles"); roles.update(new BasicDBObject(), new BasicDBObject("$rename", new BasicDBObject("applicationId", "clientId")), false, true); log.debugv("Renamed roles.applicationId to roles.clientId"); + + db.getCollection("clients").dropIndex("realmId_1_name_1"); + ensureIndex("clients", new String[]{"realmId", "clientId"}, true, false); + } private void convertOAuthClientsToClients() {