Hi,
While upgrading to Keycloak 3.4.0, I just found that the database cannot
be initialized when there is a schema.
I have the following error:
Table "RESOURCE_SERVER_POLICY" not found; SQL statement:
UPDATE RESOURCE_SERVER_POLICY p SET RESOURCE_SERVER_CLIENT_ID =
(SELECT CLIENT_ID FROM RESOURCE_SERVER s WHERE s.ID =
p.RESOURCE_SERVER_ID)
This issue seems to come from /jpa-changelog-authz-3.4.0.CR1.xml/ which
contains hard coded SQL statements.
To reproduce the issue you have to do 2 changes in standalone.xml file:
* Use the following connection url for the KeycloakDS data source:
/jdbc:h2:${jboss.server.data.dir}/keycloak;AUTO_SERVER=TRUE;INIT=CREATE
SCHEMA IF NOT EXISTS mySchema/
* add /<property name="schema" value="mySchema"/>/ in
/connectionsJpa/
Thanks,
Benoit