From 517e42f13d85873cb2a0a35a9ed88a6fc50dd1be Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Tue, 14 Apr 2015 08:05:24 +0200 Subject: [PATCH] KEYCLOAK-1187 --- .../mongo/updater/impl/updates/Update1_2_0_RC1.java | 4 ++++ 1 file changed, 4 insertions(+) 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() {