Skip to content

Commit

Permalink
- changed script locations
Browse files Browse the repository at this point in the history
- fixing test containers
  • Loading branch information
pefernan committed Sep 25, 2024
1 parent 4397509 commit bcf611f
Show file tree
Hide file tree
Showing 46 changed files with 27 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public JobServiceContainer() {
waitingFor(Wait.forHttp("/q/health/live").forStatusCode(200)).withStartupTimeout(Constants.CONTAINER_START_TIMEOUT);
addEnv("QUARKUS_HTTP_PORT", Integer.toString(PORT));
addEnv("QUARKUS_LOG_CATEGORY__ORG_KIE_KOGITO_JOBS_SERVICE__LEVEL", "DEBUG");
addEnv("KIE_FLYWAY_ENABLED", "true");
withAccessToHost(true);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@

module.name=data-audit

module.locations.h2=classpath:db/data-audit/h2
module.locations.postgresql=classpath:db/data-audit/postgresql
module.locations.h2=classpath:kie-flyway/db/data-audit/h2
module.locations.postgresql=classpath:kie-flyway/db/data-audit/postgresql
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/src/main/resources/db/data-index/postgresql/*
/src/main/resources/kie-flyway/db/data-index/postgresql/*
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

<properties>
<path.to.postgresql.storage>../data-index-storage-postgresql</path.to.postgresql.storage>
<path.to.script.folder>src/main/resources/db/</path.to.script.folder>
<path.to.script.folder>src/main/resources/kie-flyway/db/</path.to.script.folder>
<path.to.migration.scripts.from>${path.to.postgresql.storage}/${path.to.script.folder}/data-index/postgresql</path.to.migration.scripts.from>
<path.to.migration.scripts.to>${path.to.script.folder}/data-index/postgresql</path.to.migration.scripts.to>
<java.module.name>org.kie.kogito.index.jpa</java.module.name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@

module.name=data-index

module.locations.postgresql=classpath:db/data-index/postgresql,classpath:db/persistence-common/postgresql
module.locations.default=classpath:db/data-index/ansi,classpath:db/persistence-common/ansi
module.locations.postgresql=classpath:kie-flyway/db/data-index/postgresql,classpath:kie-flyway/db/persistence-common/postgresql
module.locations.default=classpath:kie-flyway/db/data-index/ansi,classpath:kie-flyway/db/persistence-common/ansi
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@

module.name=data-index

module.locations.postgresql=classpath:db/data-index/postgresql,classpath:db/persistence-common/postgresql
module.locations.postgresql=classpath:kie-flyway/db/data-index/postgresql,classpath:kie-flyway/db/persistence-common/postgresql
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ public void setPostgreSqlURL(String postgreSqlURL, String username, String passw
}

public void migrateDB() {
addEnv("QUARKUS_FLYWAY_MIGRATE_AT_START", "true");
addEnv("QUARKUS_FLYWAY_BASELINE_ON_MIGRATE", "true");
addEnv("QUARKUS_FLYWAY_TABLE", "data-index-flyway");
addEnv("KIE_FLYWAY_ENABLED", "true");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@

module.name=jobs-service

module.locations.postgresql=classpath:db/jobs-service/postgresql
module.locations.postgresql=classpath:kie-flyway/db/jobs-service/postgresql
2 changes: 1 addition & 1 deletion jobs-service/jobs-service-storage-jpa/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/src/main/resources/db/jobs-service/postgresql/*
/src/main/resources/kie-flyway/db/jobs-service/postgresql/*
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@

module.name=jobs-service

module.locations.postgresql=classpath:db/jobs-service/postgresql
module.locations.default=classpath:db/jobs-service/ansi
module.locations.postgresql=classpath:kie-flyway/db/jobs-service/postgresql
module.locations.default=classpath:kie-flyway/db/jobs-service/ansi
16 changes: 8 additions & 8 deletions persistence-commons/kogito-ddl/src/assembly/multi-repo-zip.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@
<fileSets>
<!-- Persistence Commons -->
<fileSet>
<directory>${project.root.dir}/persistence-commons/persistence-commons-jpa/src/main/resources/db/persistence-commons/ansi</directory>
<directory>${project.root.dir}/persistence-commons/persistence-commons-jpa/src/main/resources/kie-flyway/db/persistence-commons/ansi</directory>
<outputDirectory>h2/persistence-commons</outputDirectory>
<includes>
<include>*.sql</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.root.dir}/persistence-commons/persistence-commons-postgresql/src/main/resources/db/persistence-commons/postgresql</directory>
<directory>${project.root.dir}/persistence-commons/persistence-commons-postgresql/src/main/resources/kie-flyway/db/persistence-commons/postgresql</directory>
<outputDirectory>postgresql/persistence-commons</outputDirectory>
<includes>
<include>*.sql</include>
Expand All @@ -54,14 +54,14 @@

<!-- Data Index -->
<fileSet>
<directory>${project.root.dir}/data-index/data-index-storage/data-index-storage-jpa/src/main/resources/db/data-index/ansi</directory>
<directory>${project.root.dir}/data-index/data-index-storage/data-index-storage-jpa/src/main/resources/kie-flyway/db/data-index/ansi</directory>
<outputDirectory>h2/data-index</outputDirectory>
<includes>
<include>*.sql</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.root.dir}/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/db/data-index/postgresql</directory>
<directory>${project.root.dir}/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/kie-flyway/db/data-index/postgresql</directory>
<outputDirectory>postgresql/data-index</outputDirectory>
<includes>
<include>*.sql</include>
Expand All @@ -70,14 +70,14 @@

<!-- Data Audit -->
<fileSet>
<directory>${project.root.dir}/data-audit/kogito-addons-data-audit-jpa/kogito-addons-data-audit-jpa-common/src/main/resources/db/data-audit/h2</directory>
<directory>${project.root.dir}/data-audit/kogito-addons-data-audit-jpa/kogito-addons-data-audit-jpa-common/src/main/resources/kie-flyway/db/data-audit/h2</directory>
<outputDirectory>h2/data-audit</outputDirectory>
<includes>
<include>*.sql</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.root.dir}/data-audit/kogito-addons-data-audit-jpa/kogito-addons-data-audit-jpa-common/src/main/resources/db/data-audit/postgresql</directory>
<directory>${project.root.dir}/data-audit/kogito-addons-data-audit-jpa/kogito-addons-data-audit-jpa-common/src/main/resources/kie-flyway/db/data-audit/postgresql</directory>
<outputDirectory>postgresql/data-audit</outputDirectory>
<includes>
<include>*.sql</include>
Expand All @@ -86,14 +86,14 @@

<!-- Job Service -->
<fileSet>
<directory>${project.root.dir}/jobs-service/jobs-service-storage-jpa/src/main/resources/db/jobs-service/ansi</directory>
<directory>${project.root.dir}/jobs-service/jobs-service-storage-jpa/src/main/resources/kie-flyway/db/jobs-service/ansi</directory>
<outputDirectory>h2/jobs-service</outputDirectory>
<includes>
<include>*.sql</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.root.dir}/jobs-service/jobs-service-postgresql-common/src/main/resources/db/jobs-service/postgresql</directory>
<directory>${project.root.dir}/jobs-service/jobs-service-postgresql-common/src/main/resources/kie-flyway/db/jobs-service/postgresql</directory>
<outputDirectory>postgresql/jobs-service</outputDirectory>
<includes>
<include>*.sql</include>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<fileSets>
<!-- Persistence Commons -->
<fileSet>
<directory>${project.root.dir}/persistence-commons/persistence-commons-postgresql/src/main/resources/db/persistence-commons/postgresql</directory>
<directory>${project.root.dir}/persistence-commons/persistence-commons-postgresql/src/main/resources/kie-flyway/db/persistence-commons/postgresql</directory>
<outputDirectory>postgresql/persistence-commons</outputDirectory>
<includes>
<include>*.sql</include>
Expand All @@ -47,7 +47,7 @@

<!-- Data Index -->
<fileSet>
<directory>${project.root.dir}/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/db/data-index/postgresql</directory>
<directory>${project.root.dir}/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/kie-flyway/db/data-index/postgresql</directory>
<outputDirectory>postgresql/data-index</outputDirectory>
<includes>
<include>*.sql</include>
Expand All @@ -56,7 +56,7 @@

<!-- Data Audit -->
<fileSet>
<directory>${project.root.dir}/data-audit/kogito-addons-data-audit-jpa/kogito-addons-data-audit-jpa-common/src/main/resources/db/data-audit/postgresql</directory>
<directory>${project.root.dir}/data-audit/kogito-addons-data-audit-jpa/kogito-addons-data-audit-jpa-common/src/main/resources/kie-flyway/db/data-audit/postgresql</directory>
<outputDirectory>postgresql/data-audit</outputDirectory>
<includes>
<include>*.sql</include>
Expand All @@ -65,7 +65,7 @@

<!-- Job Service -->
<fileSet>
<directory>${project.root.dir}/jobs-service/jobs-service-postgresql-common/src/main/resources/db/jobs-service/postgresql</directory>
<directory>${project.root.dir}/jobs-service/jobs-service-postgresql-common/src/main/resources/kie-flyway/db/jobs-service/postgresql</directory>
<outputDirectory>postgresql/jobs-service</outputDirectory>
<includes>
<include>*.sql</include>
Expand Down
2 changes: 1 addition & 1 deletion persistence-commons/persistence-commons-jpa/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/src/main/resources/db/persistence-commons/postgresql/*
/src/main/resources/kie-flyway/db/persistence-commons/postgresql/*
2 changes: 1 addition & 1 deletion persistence-commons/persistence-commons-jpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

<properties>
<path.to.postgresql.storage>../persistence-commons-postgresql</path.to.postgresql.storage>
<path.to.script.folder>src/main/resources/db/</path.to.script.folder>
<path.to.script.folder>src/main/resources/kie-flyway/db/</path.to.script.folder>
<path.to.migration.scripts.from>${path.to.postgresql.storage}/${path.to.script.folder}/persistence-commons/postgresql</path.to.migration.scripts.from>
<path.to.migration.scripts.to>${path.to.script.folder}/persistence-commons/postgresql</path.to.migration.scripts.to>
<java.module.name>org.kie.kogito.persistence.jpa</java.module.name>
Expand Down

0 comments on commit bcf611f

Please sign in to comment.