Skip to content

Commit

Permalink
KEYCLOAK-869 Rename EventEntity time column to entity_time
Browse files Browse the repository at this point in the history
  • Loading branch information
stianst committed Dec 29, 2014
1 parent ebf85cf commit 9d63482
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.2.xsd">
<changeSet author="sthorger@redhat.com" id="1.1.0.Final">
<renameColumn tableName="EVENT_ENTITY" oldColumnName="TIME" newColumnName="EVENT_TIME" columnDataType="BIGINT"/>
</changeSet>
</databaseChangeLog>
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.2.xsd">
<include file="META-INF/jpa-changelog-1.0.0.Final.xml"/>
<include file="META-INF/jpa-changelog-1.1.0.Beta1.xml"/>
<include file="META-INF/jpa-changelog-1.1.0.Final.xml"/>
</databaseChangeLog>
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
52 changes: 52 additions & 0 deletions misc/DatabaseTesting.md
Original file line number Diff line number Diff line change
@@ -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:


0 comments on commit 9d63482

Please sign in to comment.