KEYCLOAK-2737 Remove 'databaseSchema' property from connectionsMongo
This commit is contained in:
parent
e02d0ed629
commit
afd3a36ee4
4 changed files with 6 additions and 16 deletions
|
@ -333,8 +333,7 @@ bin/add-user-keycloak.[sh|bat] -r master -u <username> -p <password>
|
|||
"host": "127.0.0.1",
|
||||
"port": "27017",
|
||||
"db": "keycloak",
|
||||
"connectionsPerHost": 100,
|
||||
"databaseSchema": "update"
|
||||
"connectionsPerHost": 100
|
||||
}
|
||||
}
|
||||
]]></programlisting>
|
||||
|
|
|
@ -156,20 +156,13 @@ public class DefaultMongoConnectionFactoryProvider implements MongoConnectionPro
|
|||
}
|
||||
|
||||
private void update(KeycloakSession session) {
|
||||
String databaseSchema = config.get("databaseSchema");
|
||||
if (databaseSchema != null) {
|
||||
if (databaseSchema.equals("update")) {
|
||||
MongoUpdaterProvider mongoUpdater = session.getProvider(MongoUpdaterProvider.class);
|
||||
MongoUpdaterProvider mongoUpdater = session.getProvider(MongoUpdaterProvider.class);
|
||||
|
||||
if (mongoUpdater == null) {
|
||||
throw new RuntimeException("Can't update database: Mongo updater provider not found");
|
||||
}
|
||||
|
||||
mongoUpdater.update(session, db);
|
||||
} else {
|
||||
throw new RuntimeException("Invalid value for databaseSchema: " + databaseSchema);
|
||||
}
|
||||
if (mongoUpdater == null) {
|
||||
throw new RuntimeException("Can't update database: Mongo updater provider not found");
|
||||
}
|
||||
|
||||
mongoUpdater.update(session, db);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -94,7 +94,6 @@
|
|||
"host": "${keycloak.connectionsMongo.host:127.0.0.1}",
|
||||
"port": "${keycloak.connectionsMongo.port:27017}",
|
||||
"db": "${keycloak.connectionsMongo.db:keycloak}",
|
||||
"databaseSchema": "${keycloak.connectionsMongo.databaseSchema:update}",
|
||||
"connectionsPerHost": "${keycloak.connectionsMongo.connectionsPerHost:100}"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -73,7 +73,6 @@
|
|||
"host": "${keycloak.connectionsMongo.host:127.0.0.1}",
|
||||
"port": "${keycloak.connectionsMongo.port:27017}",
|
||||
"db": "${keycloak.connectionsMongo.db:keycloak}",
|
||||
"databaseSchema": "${keycloak.connectionsMongo.databaseSchema:update}",
|
||||
"connectionsPerHost": "${keycloak.connectionsMongo.connectionsPerHost:100}"
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue