Skip to content

Commit

Permalink
KOGITO-7676: Implement Flyway migration for Runtimes persistence base…
Browse files Browse the repository at this point in the history
…d on Quarkus (#1404)

* KOGITO-7676: Disabling jdbc driver for PostgreSQL properties due to conflict on Flyway

* Fixed Tests

* KOGITO-7676: Inrorporating comments

* KOGITO-7676: Inrorporating comments

* * updated postgresql docker image

 * fixing flyway for reactive client
  • Loading branch information
akumar074 authored Dec 9, 2022
1 parent aa842d4 commit 3029823
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3"

services:
postgres-compose:
image: postgres:9.6
image: postgres:13.4-alpine3.14
environment:
POSTGRES_PASSWORD: pass
ports:
Expand All @@ -28,4 +28,4 @@ services:

networks:
postgres-compose-network:
driver: bridge
driver: bridge
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ quarkus.swagger-ui.always-include=true
kogito.persistence.type=jdbc

quarkus.datasource.db-kind=postgresql
quarkus.datasource.username=postgres
quarkus.datasource.password=changeme
quarkus.datasource.jdbc.url=jdbc:postgresql://localhost:5432/jdbc_test
quarkus.datasource.username=kogito-user
quarkus.datasource.password=kogito-pass
quarkus.datasource.jdbc.url=jdbc:postgresql://localhost:5432/kogito



Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ kogito.persistence.type=postgresql

quarkus.datasource.username=kogito-user
quarkus.datasource.password=kogito-pass
quarkus.datasource.jdbc.url=jdbc:postgresql://localhost:5432/kogito
quarkus.datasource.reactive.url=postgresql://localhost:5432/kogito

#run create tables scripts
kogito.persistence.auto.ddl=true

quarkus.flyway.migrate-at-start=true

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3"

services:
postgres-compose:
image: postgres:9.6
image: postgres:13.4-alpine3.14
environment:
POSTGRES_PASSWORD: pass
ports:
Expand All @@ -29,4 +29,4 @@ services:

networks:
postgres-compose-network:
driver: bridge
driver: bridge
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
Expand Down Expand Up @@ -101,6 +101,14 @@
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-addons-springboot-persistence-postgresql</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
server.address=0.0.0.0

#run create tables scripts during the application startup
kogito.persistence.auto.ddl=true
spring.flyway.enabled=true
spring.flyway.baseline-on-migrate=true

#jdbc
kogito.persistence.type=jdbc
spring.datasource.url=jdbc:postgresql://localhost:5432/jdbc_test
spring.datasource.username=postgres
spring.datasource.password=changeme
spring.datasource.url=jdbc:postgresql://localhost:5432/kogito
spring.datasource.username=kogito-user
spring.datasource.password=kogito-pass
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ kogito.persistence.type=postgresql
#Details https://www.postgresql.org/docs/9.6/static/libpq-connect.html#LIBPQ-CONNSTRING
kogito.persistence.postgresql.connection.uri=postgresql://kogito-user:kogito-pass@localhost:5432/kogito

spring.datasource.url=jdbc:postgresql://localhost:5432/kogito
spring.datasource.username=kogito-user
spring.datasource.password=kogito-pass
#run create tables scripts during the application startup
kogito.persistence.auto.ddl=true
spring.flyway.enabled=true
spring.flyway.baseline-on-migrate=true


0 comments on commit 3029823

Please sign in to comment.