parent
cbfd989ca9
commit
b2e55762f1
3 changed files with 8 additions and 2 deletions
|
@ -78,7 +78,7 @@ final class DatabasePropertyMappers {
|
||||||
.isMasked(true)
|
.isMasked(true)
|
||||||
.build(),
|
.build(),
|
||||||
builder().from("db.schema")
|
builder().from("db.schema")
|
||||||
.to("quarkus.datasource.schema")
|
.to("quarkus.hibernate-orm.database.default-schema")
|
||||||
.description("The database schema to be used.")
|
.description("The database schema to be used.")
|
||||||
.paramLabel("schema")
|
.paramLabel("schema")
|
||||||
.build(),
|
.build(),
|
||||||
|
|
|
@ -65,6 +65,7 @@ import org.keycloak.models.dblock.DBLockManager;
|
||||||
import org.keycloak.models.dblock.DBLockProvider;
|
import org.keycloak.models.dblock.DBLockProvider;
|
||||||
import org.keycloak.models.utils.RepresentationToModel;
|
import org.keycloak.models.utils.RepresentationToModel;
|
||||||
import org.keycloak.provider.ServerInfoAwareProviderFactory;
|
import org.keycloak.provider.ServerInfoAwareProviderFactory;
|
||||||
|
import org.keycloak.quarkus.runtime.configuration.Configuration;
|
||||||
import org.keycloak.representations.idm.RealmRepresentation;
|
import org.keycloak.representations.idm.RealmRepresentation;
|
||||||
import org.keycloak.representations.idm.UserRepresentation;
|
import org.keycloak.representations.idm.UserRepresentation;
|
||||||
import org.keycloak.services.ServicesLogger;
|
import org.keycloak.services.ServicesLogger;
|
||||||
|
@ -175,7 +176,7 @@ public final class QuarkusJpaConnectionProviderFactory implements JpaConnectionP
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getSchema() {
|
public String getSchema() {
|
||||||
return config.get("schema");
|
return Configuration.getRawValue("kc.db.schema");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -304,6 +304,11 @@ public class ConfigurationTest {
|
||||||
assertEquals("jdbc:postgresql://localhost/keycloak?test=test&test1=test1", config.getConfigValue("quarkus.datasource.jdbc.url").getValue());
|
assertEquals("jdbc:postgresql://localhost/keycloak?test=test&test1=test1", config.getConfigValue("quarkus.datasource.jdbc.url").getValue());
|
||||||
assertEquals(QuarkusPostgreSQL10Dialect.class.getName(), config.getConfigValue("quarkus.hibernate-orm.dialect").getValue());
|
assertEquals(QuarkusPostgreSQL10Dialect.class.getName(), config.getConfigValue("quarkus.hibernate-orm.dialect").getValue());
|
||||||
assertEquals(PGXADataSource.class.getName(), config.getConfigValue("quarkus.datasource.jdbc.driver").getValue());
|
assertEquals(PGXADataSource.class.getName(), config.getConfigValue("quarkus.datasource.jdbc.driver").getValue());
|
||||||
|
|
||||||
|
System.setProperty(CLI_ARGS, "--db-schema=test-schema");
|
||||||
|
config = createConfig();
|
||||||
|
assertEquals("test-schema", config.getConfigValue("kc.db.schema").getValue());
|
||||||
|
assertEquals("test-schema", config.getConfigValue("quarkus.hibernate-orm.database.default-schema").getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
// KEYCLOAK-15632
|
// KEYCLOAK-15632
|
||||||
|
|
Loading…
Reference in a new issue