diff --git a/connections/jpa-liquibase/src/main/resources/META-INF/jpa-changelog-1.1.0.Final.xml b/connections/jpa-liquibase/src/main/resources/META-INF/jpa-changelog-1.1.0.Final.xml new file mode 100755 index 0000000000..aa7e4cc86b --- /dev/null +++ b/connections/jpa-liquibase/src/main/resources/META-INF/jpa-changelog-1.1.0.Final.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/connections/jpa-liquibase/src/main/resources/META-INF/jpa-changelog-master.xml b/connections/jpa-liquibase/src/main/resources/META-INF/jpa-changelog-master.xml index 010b121b68..1a1e0a7736 100644 --- a/connections/jpa-liquibase/src/main/resources/META-INF/jpa-changelog-master.xml +++ b/connections/jpa-liquibase/src/main/resources/META-INF/jpa-changelog-master.xml @@ -2,4 +2,5 @@ + diff --git a/events/jpa/src/main/java/org/keycloak/events/jpa/EventEntity.java b/events/jpa/src/main/java/org/keycloak/events/jpa/EventEntity.java index 7260dc8300..4a68bb3420 100644 --- a/events/jpa/src/main/java/org/keycloak/events/jpa/EventEntity.java +++ b/events/jpa/src/main/java/org/keycloak/events/jpa/EventEntity.java @@ -16,7 +16,7 @@ public class EventEntity { @Column(name="ID", length = 36) private String id; - @Column(name="\"TIME\"") + @Column(name="EVENT_TIME") private long time; @Column(name="TYPE") diff --git a/misc/DatabaseTesting.md b/misc/DatabaseTesting.md new file mode 100644 index 0000000000..5e67c29e55 --- /dev/null +++ b/misc/DatabaseTesting.md @@ -0,0 +1,52 @@ +Test with various databases +=========================== + + +MySQL +----- + +Use the official [MySQL docker image](https://registry.hub.docker.com/_/mysql/). + +Start MySQL: + + docker run --name mysql -e MYSQL_DATABASE=keycloak -e MYSQL_USER=keycloak -e MYSQL_PASSWORD=keycloak -e MYSQL_ROOT_PASSWORD=keycloak -d mysql + +Run tests: + + mvn clean install -Dkeycloak.connectionsJpa.url=jdbc:mysql://`docker inspect --format '{{ .NetworkSettings.IPAddress }}' mysql`/keycloak -Dkeycloak.connectionsJpa.driver=com.mysql.jdbc.Driver -Dkeycloak.connectionsJpa.user=keycloak -Dkeycloak.connectionsJpa.password=keycloak + +Stop MySQl: + + docker rm -f mysql + + +PostgreSQL +---------- + +Use the official [PostgreSQL docker image](https://registry.hub.docker.com/_/postgres/). + +Start MySQL: + + docker run --name postgres -e POSTGRES_DATABASE=keycloak -e POSTGRES_USER=keycloak -e POSTGRES_PASSWORD=keycloak -e POSTGRES_ROOT_PASSWORD=keycloak -d postgres + +Run tests: + + mvn clean install -Dkeycloak.connectionsJpa.url=jdbc:postgresql://`docker inspect --format '{{ .NetworkSettings.IPAddress }}' postgres`:5432/keycloak -Dkeycloak.connectionsJpa.driver=org.postgresql.Driver -Dkeycloak.connectionsJpa.user=keycloak -Dkeycloak.connectionsJpa.password=keycloak + +Stop MySQl: + + docker rm -f postgres + + +Oracle +------ + +Use the unoffical [Oracle XE 11g image](docker run -d -p 49160:22 -p 49161:1521 -p 49162:8080 alexeiled/docker-oracle-xe-11g). + +Start Oracle XE: + + docker run --name oracle -d alexeiled/docker-oracle-xe-11g + +Run tests: + +