This is an automated email from the ASF dual-hosted git repository.

ricardozanini pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-tools.git


The following commit(s) were added to refs/heads/main by this push:
     new 19a3be9d717 kie-issues#2659: [SonataFlow] Migrate DBMigration Image 
from SonataFlow operator repository to kie-tools (#2697)
19a3be9d717 is described below

commit 19a3be9d7176a141c4e64b024b89db0ae25da695
Author: rhkp <[email protected]>
AuthorDate: Wed Jan 29 16:24:37 2025 +0000

    kie-issues#2659: [SonataFlow] Migrate DBMigration Image from SonataFlow 
operator repository to kie-tools (#2697)
---
 .ci/jenkins/Jenkinsfile.daily-dev-publish          |  20 ++
 .../Jenkinsfile.kogito-db-migrator-tool            | 210 +++++++++++++++++++++
 .gitignore                                         |   3 +-
 packages/kogito-db-migrator-tool-image/README.md   |  94 +++++++++
 .../kogito-db-migrator-tool-image/env/index.js     |  54 ++++++
 packages/kogito-db-migrator-tool-image/install.js  |  64 +++++++
 .../kogito-db-migrator-tool-image/package.json     |  45 +++++
 ...ncubator-kie-kogito-db-migrator-tool-image.yaml |  48 +++++
 .../postgresql/added/kogito-app-launch.sh          |  26 +++
 .../kogito-db-migrator-tool/postgresql/configure   |  32 ++++
 .../kogito-db-migrator-tool/postgresql/module.yaml |  28 +++
 packages/kogito-db-migrator-tool/.gitignore        |   4 +
 packages/kogito-db-migrator-tool/README.md         |  31 +++
 packages/kogito-db-migrator-tool/env/index.js      |  31 +++
 packages/kogito-db-migrator-tool/install.js        |  27 +++
 packages/kogito-db-migrator-tool/package.json      |  37 ++++
 packages/kogito-db-migrator-tool/pom.xml           | 126 +++++++++++++
 .../migrator/postgresql/DBConnectionChecker.java   |  66 +++++++
 .../kie/kogito/migrator/postgresql/DBMigrator.java |  94 +++++++++
 .../migrator/postgresql/MigrationService.java      |  66 +++++++
 .../src/main/resources/application.properties      |  40 ++++
 .../postgresql/DBConnectionCheckerTest.java        |  72 +++++++
 .../kogito/migrator/postgresql/DBMigratorTest.java | 102 ++++++++++
 .../migrator/postgresql/MigrationServiceTest.java  |  80 ++++++++
 packages/maven-base/pom.xml                        |   1 +
 .../scripts/build-kogito-apps-components.sh        |   3 +
 pnpm-lock.yaml                                     |  46 +++++
 repo/graph.dot                                     |   5 +
 repo/graph.json                                    |  19 ++
 29 files changed, 1472 insertions(+), 2 deletions(-)

diff --git a/.ci/jenkins/Jenkinsfile.daily-dev-publish 
b/.ci/jenkins/Jenkinsfile.daily-dev-publish
index 3cf19f24da1..7e8fdc3a68e 100644
--- a/.ci/jenkins/Jenkinsfile.daily-dev-publish
+++ b/.ci/jenkins/Jenkinsfile.daily-dev-publish
@@ -130,6 +130,11 @@ pipeline {
         KOGITO_MANAGEMENT_CONSOLE__name = 
'incubator-kie-kogito-management-console'
         KOGITO_MANAGEMENT_CONSOLE__buildTag = "${params.BRANCH_NAME}"
 
+        KOGITO_DB_MIGRATOR_TOOL__registry = 'docker.io'
+        KOGITO_DB_MIGRATOR_TOOL__account = 'apache'
+        KOGITO_DB_MIGRATOR_TOOL__name = 'kogito-db-migrator-tool'
+        KOGITO_DB_MIGRATOR_TOOL__buildTag = "${params.BRANCH_NAME}"
+
         SONATAFLOW_BUILDER_IMAGE__registry = 'docker.io'
         SONATAFLOW_BUILDER_IMAGE__account = 'apache'
         SONATAFLOW_BUILDER_IMAGE__name = 'incubator-kie-sonataflow-builder'
@@ -539,6 +544,21 @@ pipeline {
             }
         }
 
+        stage('Push kogito-db-migrator-tool to Docker Hub') {
+            steps {
+                script {
+                    dockerUtils.pushImageToRegistry(
+                        "${env.KOGITO_DB_MIGRATOR_TOOL__registry}",
+                        "${env.KOGITO_DB_MIGRATOR_TOOL__account}",
+                        "${env.KOGITO_DB_MIGRATOR_TOOL__name}",
+                        "${env.KOGITO_DB_MIGRATOR_TOOL__buildTag}",
+                        "${pipelineVars.dockerHubUserCredentialsId}",
+                        "${pipelineVars.dockerHubTokenCredentialsId}"
+                    )
+                }
+            }
+        }
+
         stage('Push kie-sandbox-helm-chart to Docker Hub') {
             steps {
                 dir('kie-tools') {
diff --git a/.ci/jenkins/release-jobs/Jenkinsfile.kogito-db-migrator-tool 
b/.ci/jenkins/release-jobs/Jenkinsfile.kogito-db-migrator-tool
new file mode 100644
index 00000000000..e6eec502f15
--- /dev/null
+++ b/.ci/jenkins/release-jobs/Jenkinsfile.kogito-db-migrator-tool
@@ -0,0 +1,210 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+pipeline {
+    agent {
+        docker {
+            image 'docker.io/apache/incubator-kie-tools-ci-build:main'
+            args '--shm-size=2g --privileged --group-add docker'
+        }
+    }
+
+    options {
+        timeout(time: 60, unit: 'MINUTES')
+    }
+
+    parameters {
+        booleanParam(description: 'Dry run', name: 'DRY_RUN', defaultValue: 
true)
+        string(description: 'Release Version', name: 'RELEASE_VERSION', 
defaultValue: '0.0.0')
+        string(description: 'Base Ref', name: 'BASE_REF')
+        string(description: 'Release Candidate Version', name: 
'RELEASE_CANDIDATE_VERSION', defaultValue: '')
+    }
+
+    environment {
+        KIE_TOOLS_BUILD__runLinters = 'false'
+        KIE_TOOLS_BUILD__runTests = 'false'
+        KIE_TOOLS_BUILD__runEndToEndTests = 'false'
+        KIE_TOOLS_BUILD__buildContainerImages = 'true'
+
+
+        KOGITO_DB_MIGRATOR_TOOL__registry = 'docker.io'
+        KOGITO_DB_MIGRATOR_TOOL__account = 'apache'
+        KOGITO_DB_MIGRATOR_TOOL__name = 'kogito-db-migrator-tool'
+        KOGITO_DB_MIGRATOR_TOOL__buildTag = "${params.RELEASE_VERSION}"
+
+        RELEASE_ARTIFACTS_DIR = "${WORKSPACE}/release-artifacts"
+
+        DOCKER_CONFIG = "${WORKSPACE}/.docker"
+
+        PNPM_FILTER_STRING = '-F @kie-tools/kogito-db-migrator-tool...'
+    }
+
+    stages {
+        stage('Load local shared scripts') {
+            steps {
+                script {
+                    pipelineVars = load 
'.ci/jenkins/shared-scripts/pipelineVars.groovy'
+                    buildUtils = load 
'.ci/jenkins/shared-scripts/buildUtils.groovy'
+                    githubUtils = load 
'.ci/jenkins/shared-scripts/githubUtils.groovy'
+                    dockerUtils = load 
'.ci/jenkins/shared-scripts/dockerUtils.groovy'
+                    releaseUtils = load 
'.ci/jenkins/shared-scripts/releaseUtils.groovy'
+                }
+            }
+        }
+
+        stage('Start required services for build and tests (DinD, Xvfb, 
Fluxbox)') {
+            steps {
+                script {
+                    buildUtils.startRequiredServices()
+                }
+            }
+        }
+
+        stage('Clean workspace before build') {
+            steps {
+                cleanWs(deleteDirs: true, disableDeferredWipeout: true)
+            }
+        }
+
+        stage('Load upstream images') {
+            when {
+                expression { !params.DRY_RUN && 
params.RELEASE_CANDIDATE_VERSION != '' }
+            }
+            steps {
+                script {
+                    upstreamReleaseArtifactsDir = 
"${WORKSPACE}/upstream-release-artifacts"
+                    
releaseUtils.downloadReleaseArtifacts("${pipelineVars.asfReleaseStagingRepository}",
 "${upstreamReleaseArtifactsDir}", "${params.RELEASE_CANDIDATE_VERSION}")
+                    upstreamImagesArtifacts = 
releaseUtils.getUpstreamImagesArtifactsList("${upstreamReleaseArtifactsDir}", 
"${params.RELEASE_CANDIDATE_VERSION}")
+                    dockerUtils.loadImages(upstreamImagesArtifacts as String[])
+                }
+            }
+        }
+
+        stage('Checkout kie-tools') {
+            steps {
+                dir('kie-tools') {
+                    script {
+                        githubUtils.checkoutRepo(
+                            
"http://github.com/${pipelineVars.githubRepositorySlug}.git";,
+                            "${params.BASE_REF}",
+                            "${pipelineVars.kieToolsBotGithubCredentialsId}"
+                        )
+                    }
+                }
+            }
+        }
+
+        stage('Setup PNPM') {
+            steps {
+                dir('kie-tools') {
+                    script {
+                        
buildUtils.setupPnpm("${pipelineVars.mavenSettingsReleaseConfigFileId}")
+                    }
+                }
+            }
+        }
+
+        stage('PNPM Bootstrap') {
+            steps {
+                dir('kie-tools') {
+                    script {
+                        buildUtils.pnpmBootstrap("${env.PNPM_FILTER_STRING}")
+                    }
+                }
+            }
+        }
+
+        stage('Build') {
+            steps {
+                dir('kie-tools') {
+                    script {
+                        buildUtils.pnpmBuild("${env.PNPM_FILTER_STRING}")
+                    }
+                }
+            }
+        }
+
+        stage('Push kogito-db-migrator-tool to Docker Hub') {
+            when {
+                expression { !params.DRY_RUN && 
params.RELEASE_CANDIDATE_VERSION == '' }
+            }
+            steps {
+                script {
+                    dockerUtils.pushImageToRegistry(
+                        "${env.KOGITO_DB_MIGRATOR_TOOL__registry}",
+                        "${env.KOGITO_DB_MIGRATOR_TOOL__account}",
+                        "${env.KOGITO_DB_MIGRATOR_TOOL__name}",
+                        "${env.KOGITO_DB_MIGRATOR_TOOL_buildTag}",
+                        "${pipelineVars.dockerHubUserCredentialsId}",
+                        "${pipelineVars.dockerHubTokenCredentialsId}"
+                    )
+                }
+            }
+        }
+
+        stage('Setup release candidate artifacts') {
+            when {
+                expression { !params.DRY_RUN && 
params.RELEASE_CANDIDATE_VERSION != '' }
+            }
+            steps {
+                script {
+                    env.RELEASE_IMAGE_TAR_FILE = 
"incubator-kie-${params.RELEASE_CANDIDATE_VERSION}-kogito-db-migrator-tool-image.tar.gz"
+
+                    sh """#!/bin/bash -el
+                    mkdir ${env.RELEASE_ARTIFACTS_DIR}
+                    docker save 
"${env.KOGITO_DB_MIGRATOR_TOOL__registry}/${env.KOGITO_MANAGEMENT_CONSOLE__account}/${env.KOGITO_MANAGEMENT_CONSOLE__name}:${params.RELEASE_VERSION}"
 | gzip > "${env.RELEASE_ARTIFACTS_DIR}/${env.RELEASE_IMAGE_TAR_FILE}"
+                    """.trim()
+                }
+            }
+        }
+
+        stage('Sign artifact for Apache release') {
+            when {
+                expression { !params.DRY_RUN && 
params.RELEASE_CANDIDATE_VERSION != '' }
+            }
+            steps {
+                dir("${env.RELEASE_ARTIFACTS_DIR}") {
+                    script {
+                        
releaseUtils.setupSigningKey("${pipelineVars.asfReleaseGPGKeyCredentialsId}")
+                        
releaseUtils.signArtifact("${env.RELEASE_IMAGE_TAR_FILE}")
+                    }
+                }
+            }
+        }
+
+        stage('Publish Release Candidate artifacts') {
+            when {
+                expression { !params.DRY_RUN && 
params.RELEASE_CANDIDATE_VERSION != '' }
+            }
+            steps {
+                script {
+                    releaseUtils.publishArtifacts(
+                        "${env.RELEASE_ARTIFACTS_DIR}",
+                        "${pipelineVars.asfReleaseStagingRepository}",
+                        "${params.RELEASE_CANDIDATE_VERSION}",
+                        "${pipelineVars.asfReleaseSVNStagingCredentialsId}"
+                    )
+                }
+            }
+        }
+    }
+
+    post {
+        always {
+            cleanWs(deleteDirs: true)
+        }
+    }
+}
diff --git a/.gitignore b/.gitignore
index 9b7817e7c6f..6facd1e436b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -347,6 +347,5 @@ turbo.json
 packages/*/.idea
 examples/*/.idea
 
-
 # Apache RAT check excludes file
-!.rat-excludes
\ No newline at end of file
+!.rat-excludes
diff --git a/packages/kogito-db-migrator-tool-image/README.md 
b/packages/kogito-db-migrator-tool-image/README.md
new file mode 100644
index 00000000000..687be814fe5
--- /dev/null
+++ b/packages/kogito-db-migrator-tool-image/README.md
@@ -0,0 +1,94 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+     http://www.apache.org/licenses/LICENSE-2.0
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.
+-->
+
+# Kogito DB Migrator Tool Image
+
+This package contains the `Containerfile/Dockerfile` and scripts to build a 
container image for Kogito DB Migrator Tool, which currently supports 
PostgreSQL database. Future versions are expected to support more database 
variants. Details about the Kogito DB Migrator Tool can be found 
[here](../kogito-db-migrator-tool/README.md)
+
+## Additional requirements
+
+- docker
+
+## Run
+
+- Start up a clean container with:
+
+  ```bash
+    docker run docker.io/apache/incubator-kie-kogito-db-migrator-tool:main
+  ```
+
+## Customization
+
+1. Run a container with custom environment variables:
+
+| NAME                                    | DESCRIPTION                        
                                              | DEFAULT                         
          |
+| --------------------------------------- | 
--------------------------------------------------------------------------------
 | ----------------------------------------- |
+| MIGRATE_DB_DATAINDEX                    | Set to true if you want to migrate 
data index database, set to false otherwise   | false                           
          |
+| QUARKUS_DATASOURCE_DATAINDEX_JDBC_URL   | Data index database url e.g. 
jdbc:postgresql://host.docker.internal:5432/di      | 
jdbc:postgresql://localhost:5432/postgres |
+| QUARKUS_DATASOURCE_DATAINDEX_USERNAME   | Data index database username       
                                              | postgres                        
          |
+| QUARKUS_DATASOURCE_DATAINDEX_PASSWORD   | Data index database password       
                                              | postgres                        
          |
+| QUARKUS_FLYWAY_DATAINDEX_SCHEMAS        | Data index database schema         
                                              | data-index-service              
          |
+| MIGRATE_DB_JOBSSERVICE                  | Set to true if you want to migrate 
jobs service database, set to false otherwise | false                           
          |
+| QUARKUS_DATASOURCE_JOBSSERVICE_JDBC_URL | Jobs service database url e.g. 
jdbc:postgresql://host.docker.internal:5432/js    | 
jdbc:postgresql://localhost:5432/postgres |
+| QUARKUS_DATASOURCE_JOBSSERVICE_USERNAME | Jobs service database username     
                                              | postgres                        
          |
+| QUARKUS_DATASOURCE_JOBSSERVICE_PASSWORD | Jobs service database password     
                                              | postgres                        
          |
+| QUARKUS_FLYWAY_JOBSSERVICE_SCHEMAS      | Jobs service database schema       
                                              | jobs-service                    
          |
+
+### Example
+
+An example to use diverse environment variables
+
+```bash
+   docker run \
+   --env MIGRATE_DB_DATAINDEX=true \
+   --env QUARKUS_DATASOURCE_DATAINDEX_JDBC_URL=<data-index-db-url e.g. 
jdbc:postgresql://host.docker.internal:5432/di> \
+   --env QUARKUS_DATASOURCE_DATAINDEX_USERNAME=<data-index-db-user> \
+   --env QUARKUS_DATASOURCE_DATAINDEX_PASSWORD=<data-index-db-password> \
+   --env QUARKUS_FLYWAY_DATAINDEX_SCHEMAS=data-index-service \
+   --env MIGRATE_DB_JOBSSERVICE=true \
+   --env QUARKUS_DATASOURCE_JOBSSERVICE_JDBC_URL=<jobs-service-db-url e.g. 
jdbc:postgresql://host.docker.internal:5432/js> \
+   --env QUARKUS_DATASOURCE_JOBSSERVICE_USERNAME=<jobs-service-db-user> \
+   --env QUARKUS_DATASOURCE_JOBSSERVICE_PASSWORD=<jobs-service-db-password> \
+   --env QUARKUS_FLYWAY_JOBSSERVICE_SCHEMAS=jobs-service \
+   docker.io/apache/incubator-kie-kogito-db-migrator-tool:main
+```
+
+---
+
+Apache KIE (incubating) is an effort undergoing incubation at The Apache 
Software
+Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is
+required of all newly accepted projects until a further review indicates that
+the infrastructure, communications, and decision making process have stabilized
+in a manner consistent with other successful ASF projects. While incubation
+status is not necessarily a reflection of the completeness or stability of the
+code, it does indicate that the project has yet to be fully endorsed by the 
ASF.
+
+Some of the incubating project’s releases may not be fully compliant with ASF
+policy. For example, releases may have incomplete or un-reviewed licensing
+conditions. What follows is a list of known issues the project is currently
+aware of (note that this list, by definition, is likely to be incomplete):
+
+- Hibernate, an LGPL project, is being used. Hibernate is in the process of
+  relicensing to ASL v2
+- Some files, particularly test files, and those not supporting comments, may
+  be missing the ASF Licensing Header
+
+If you are planning to incorporate this work into your product/project, please
+be aware that you will need to conduct a thorough licensing review to determine
+the overall implications of including this work. For the current status of this
+project through the Apache Incubator visit:
+https://incubator.apache.org/projects/kie.html
diff --git a/packages/kogito-db-migrator-tool-image/env/index.js 
b/packages/kogito-db-migrator-tool-image/env/index.js
new file mode 100644
index 00000000000..00dc1399d44
--- /dev/null
+++ b/packages/kogito-db-migrator-tool-image/env/index.js
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+const { varsWithName, composeEnv, getOrDefault } = 
require("@kie-tools-scripts/build-env");
+
+const rootEnv = require("@kie-tools/root-env/env");
+const sonataflowImageCommonEnv = 
require("@kie-tools/sonataflow-image-common/env");
+
+module.exports = composeEnv([rootEnv, sonataflowImageCommonEnv], {
+  vars: varsWithName({
+    KOGITO_DB_MIGRATOR_TOOL_IMAGE__registry: {
+      default: "docker.io",
+      description: "The image registry.",
+    },
+    KOGITO_DB_MIGRATOR_TOOL_IMAGE__account: {
+      default: "apache",
+      description: "The image registry account.",
+    },
+    KOGITO_DB_MIGRATOR_TOOL_IMAGE__name: {
+      default: "incubator-kie-kogito-db-migrator-tool",
+      description: "The image name.",
+    },
+    KOGITO_DB_MIGRATOR_TOOL_IMAGE__buildTag: {
+      default: rootEnv.env.root.streamName,
+      description: "The image tag.",
+    },
+  }),
+  get env() {
+    return {
+      kogitoDbMigratorToolImage: {
+        registry: 
getOrDefault(this.vars.KOGITO_DB_MIGRATOR_TOOL_IMAGE__registry),
+        account: 
getOrDefault(this.vars.KOGITO_DB_MIGRATOR_TOOL_IMAGE__account),
+        name: getOrDefault(this.vars.KOGITO_DB_MIGRATOR_TOOL_IMAGE__name),
+        buildTag: 
getOrDefault(this.vars.KOGITO_DB_MIGRATOR_TOOL_IMAGE__buildTag),
+      },
+    };
+  },
+});
diff --git a/packages/kogito-db-migrator-tool-image/install.js 
b/packages/kogito-db-migrator-tool-image/install.js
new file mode 100644
index 00000000000..cec8142a81d
--- /dev/null
+++ b/packages/kogito-db-migrator-tool-image/install.js
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+const { execSync } = require("child_process");
+const fs = require("fs");
+
+const { env } = require("./env");
+const path = require("path");
+const pythonVenvDir = 
path.dirname(require.resolve("@kie-tools/python-venv/package.json"));
+const sonataflowImageCommonDir = 
path.dirname(require.resolve("@kie-tools/sonataflow-image-common/package.json"));
+const replaceInFile = require("replace-in-file");
+
+const activateCmd =
+  process.platform === "win32"
+    ? `${pythonVenvDir}\\venv\\Scripts\\Activate.bat`
+    : `. ${pythonVenvDir}/venv/bin/activate`;
+
+execSync(
+  `${activateCmd} && \
+  python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py 
--bump-to ${env.kogitoDbMigratorToolImage.buildTag} --source-folder 
./resources`,
+  { stdio: "inherit" }
+);
+
+// Find and read the -image.yaml file
+const resourcesPath = path.resolve(__dirname, "./resources");
+const files = fs.readdirSync(resourcesPath);
+const imageYamlFiles = files.filter((fileName) => 
fileName.endsWith("image.yaml"));
+if (imageYamlFiles.length !== 1) {
+  throw new Error("There should only be one image.yaml file on ./resources!");
+}
+const originalYamlPath = path.join(resourcesPath, imageYamlFiles[0]);
+let imageYaml = fs.readFileSync(originalYamlPath, "utf8");
+
+const imageUrl = 
`${env.kogitoDbMigratorToolImage.registry}/${env.kogitoDbMigratorToolImage.account}/${env.kogitoDbMigratorToolImage.name}`;
+
+// Replace the whole string between quotes ("") with the image name
+imageYaml = 
imageYaml.replace(/(?<=")(.*kie-kogito-db-migrator-tool.*)(?=")/gm, imageUrl);
+
+// Write file and then rename it to match the image name
+fs.writeFileSync(originalYamlPath, imageYaml);
+fs.renameSync(originalYamlPath, path.join(resourcesPath, 
`${env.kogitoDbMigratorToolImage.name}-image.yaml`));
+
+// Replace image URL in .feature files
+replaceInFile.sync({
+  files: ["**/*.feature"],
+  from: /@docker.io\/apache\/.*/g,
+  to: `@${imageUrl}`,
+});
diff --git a/packages/kogito-db-migrator-tool-image/package.json 
b/packages/kogito-db-migrator-tool-image/package.json
new file mode 100644
index 00000000000..14ed917e88d
--- /dev/null
+++ b/packages/kogito-db-migrator-tool-image/package.json
@@ -0,0 +1,45 @@
+{
+  "private": true,
+  "name": "@kie-tools/kogito-db-migrator-tool-image",
+  "version": "0.0.0",
+  "description": "",
+  "license": "Apache-2.0",
+  "homepage": "https://github.com/apache/incubator-kie-tools";,
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/apache/incubator-kie-tools.git";
+  },
+  "bugs": {
+    "url": "https://github.com/apache/incubator-kie-tools/issues";
+  },
+  "scripts": {
+    "build": "run-script-if --bool \"$(build-env containerImages.build)\" 
--then \"pnpm venv-activate\" \"pnpm copy-assets\" \"pnpm image:build\" 
\"rimraf target\" \"rimraf dist-tests-e2e\"",
+    "build:dev": "run-script-os",
+    "build:dev:linux": "pnpm build",
+    "build:dev:win32:darwin": "echo \"Build skipped on Windows and MacOS\"",
+    "build:prod": "run-script-os",
+    "build:prod:linux": "pnpm build",
+    "build:prod:win32:darwin": "echo \"Build skipped on Windows and MacOS\"",
+    "copy-assets": "run-script-os",
+    "copy-assets:linux:darwin": "rimraf build && cp -R 
./node_modules/@kie-tools/sonataflow-image-common/resources build && cp -R 
resources/* build && mkdir -p 
build/modules/kogito-db-migrator-tool/postgresql/quarkus-app && cp -R 
./node_modules/@kie-tools/kogito-db-migrator-tool/target/quarkus-app/* 
build/modules/kogito-db-migrator-tool/postgresql/quarkus-app",
+    "format": "prettier --write . --ignore-path=../../.prettierignore 
--ignore-path=../../.gitignore",
+    "image:build": "run-script-os",
+    "image:build:linux": "pnpm setup:env make -C ./build build",
+    "image:build:win32:darwin": "echo \"Build skipped on Windows and MacOS\"",
+    "install": "node install.js && pnpm format",
+    "setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && 
cross-env KOGITO_IMAGE_REGISTRY=$(build-env kogitoDbMigratorToolImage.registry) 
KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env kogitoDbMigratorToolImage.account) 
KOGITO_IMAGE_NAME=$(build-env kogitoDbMigratorToolImage.name) 
KOGITO_IMAGE_TAG=$(build-env kogitoDbMigratorToolImage.buildTag) 
QUARKUS_PLATFORM_GROUPID=$(build-env kogitoImagesCekitModules.quarkusGroupId) 
QUARKUS_PLATFORM_VERSION=$(build-env versions.quark [...]
+    "venv-activate": ". 
./node_modules/@kie-tools/python-venv/venv/bin/activate"
+  },
+  "dependencies": {
+    "@kie-tools/kogito-db-migrator-tool": "workspace:*",
+    "@kie-tools/python-venv": "workspace:*",
+    "@kie-tools/root-env": "workspace:*",
+    "@kie-tools/sonataflow-image-common": "workspace:*"
+  },
+  "devDependencies": {
+    "cross-env": "^7.0.3",
+    "replace-in-file": "^7.1.0",
+    "rimraf": "^3.0.2",
+    "run-script-os": "^1.1.6"
+  }
+}
diff --git 
a/packages/kogito-db-migrator-tool-image/resources/incubator-kie-kogito-db-migrator-tool-image.yaml
 
b/packages/kogito-db-migrator-tool-image/resources/incubator-kie-kogito-db-migrator-tool-image.yaml
new file mode 100644
index 00000000000..42612777599
--- /dev/null
+++ 
b/packages/kogito-db-migrator-tool-image/resources/incubator-kie-kogito-db-migrator-tool-image.yaml
@@ -0,0 +1,48 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+name: "docker.io/apache/incubator-kie-kogito-db-migrator-tool"
+version: "main"
+from: registry.access.redhat.com/ubi8/openjdk-17-runtime:1.20
+description: DBMigratorTool image for Data Index and Jobs Service database 
migration
+
+labels:
+  - name: "org.kie.kogito.version"
+    value: "### SET ME DURING BUILD PROCESS ###"
+  - name: "maintainer"
+    value: "Apache KIE <[email protected]>"
+  - name: "io.k8s.description"
+    value: "Kogito DB Migration creates schemas and tables for Data Index and 
Jobs Service, currently supporting PostgreSQL database"
+  - name: "io.k8s.display-name"
+    value: "Kogito DB Migration Tool for Data Index and Jobs Service, 
currently supporting PostgreSQL"
+  - name: "io.openshift.tags"
+    value: "kogito,db-migration"
+
+modules:
+  repositories:
+    - path: modules
+  install:
+    - name: org.kie.kogito.system.user
+    - name: org.kie.kogito.project.versions
+    - name: org.kie.kogito.db-migrator-tool.db-migration-deps
+
+run:
+  workdir: "/home/kogito/bin"
+  user: 1001
+  cmd:
+    - "/home/kogito/kogito-app-launch.sh"
diff --git 
a/packages/kogito-db-migrator-tool-image/resources/modules/kogito-db-migrator-tool/postgresql/added/kogito-app-launch.sh
 
b/packages/kogito-db-migrator-tool-image/resources/modules/kogito-db-migrator-tool/postgresql/added/kogito-app-launch.sh
new file mode 100644
index 00000000000..050e6742994
--- /dev/null
+++ 
b/packages/kogito-db-migrator-tool-image/resources/modules/kogito-db-migrator-tool/postgresql/added/kogito-app-launch.sh
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+CMD="exec java ${JAVA_OPTIONS} \
+-Djava.library.path=\"${KOGITO_HOME}/bin/lib\" \
+-jar \"${KOGITO_HOME}/bin/quarkus-run.jar\""
+
+echo "$CMD"
+eval "$CMD"
diff --git 
a/packages/kogito-db-migrator-tool-image/resources/modules/kogito-db-migrator-tool/postgresql/configure
 
b/packages/kogito-db-migrator-tool-image/resources/modules/kogito-db-migrator-tool/postgresql/configure
new file mode 100644
index 00000000000..ae404dc7f6b
--- /dev/null
+++ 
b/packages/kogito-db-migrator-tool-image/resources/modules/kogito-db-migrator-tool/postgresql/configure
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+set -e
+
+SCRIPT_DIR=$(dirname "${0}")
+ADDED_DIR="${SCRIPT_DIR}"/added
+
+cp -v "${ADDED_DIR}"/kogito-app-launch.sh "${KOGITO_HOME}"
+
+echo "Changing permissions for app launch"
+chgrp -R 0 "${KOGITO_HOME}"
+chown -R 1001 "${KOGITO_HOME}"
+chmod -R g=u "${KOGITO_HOME}"
+
+chmod +x "${KOGITO_HOME}"/kogito-app-launch.sh
diff --git 
a/packages/kogito-db-migrator-tool-image/resources/modules/kogito-db-migrator-tool/postgresql/module.yaml
 
b/packages/kogito-db-migrator-tool-image/resources/modules/kogito-db-migrator-tool/postgresql/module.yaml
new file mode 100644
index 00000000000..c366035bbb6
--- /dev/null
+++ 
b/packages/kogito-db-migrator-tool-image/resources/modules/kogito-db-migrator-tool/postgresql/module.yaml
@@ -0,0 +1,28 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+schema_version: 1
+name: org.kie.kogito.db-migrator-tool.db-migration-deps
+version: "main"
+artifacts:
+  # The following artifact comes from the package kogito-db-migrator-tool 
during the pnpm build:dev phase
+  - name: kogito-db-migrator-tool-quarkus-app
+    path: ./quarkus-app
+    dest: /home/kogito/bin
+execute:
+  - script: configure
diff --git a/packages/kogito-db-migrator-tool/.gitignore 
b/packages/kogito-db-migrator-tool/.gitignore
new file mode 100644
index 00000000000..8404612fa0f
--- /dev/null
+++ b/packages/kogito-db-migrator-tool/.gitignore
@@ -0,0 +1,4 @@
+# kogito-db-migrator-tool
+src/main/resources/postgresql
+src/main/resources/ansi
+src/main/resources/h2
\ No newline at end of file
diff --git a/packages/kogito-db-migrator-tool/README.md 
b/packages/kogito-db-migrator-tool/README.md
new file mode 100644
index 00000000000..8b8d7dda24b
--- /dev/null
+++ b/packages/kogito-db-migrator-tool/README.md
@@ -0,0 +1,31 @@
+# Kogito DB Migrator Tool
+
+This is a Java, Quarkus-based database migrator application for Data-Index and 
Jobs Service applications for use by SonataFlow Operator supporting PostgreSQL 
database currently. Future versions are expected to support more database 
variants.
+
+_NOTE_: This database migrator application and its corresponding images are 
only envisaged to be made use of by SonataFlow Operator, Data Index and Jobs 
Service internally. Conversely this application is of no use outside the 
usecases involved with SonataFlow Operator, Data Index and Jobs Service 
applications.
+
+---
+
+Apache KIE (incubating) is an effort undergoing incubation at The Apache 
Software
+Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is
+required of all newly accepted projects until a further review indicates that
+the infrastructure, communications, and decision making process have stabilized
+in a manner consistent with other successful ASF projects. While incubation
+status is not necessarily a reflection of the completeness or stability of the
+code, it does indicate that the project has yet to be fully endorsed by the 
ASF.
+
+Some of the incubating project’s releases may not be fully compliant with ASF
+policy. For example, releases may have incomplete or un-reviewed licensing
+conditions. What follows is a list of known issues the project is currently
+aware of (note that this list, by definition, is likely to be incomplete):
+
+- Hibernate, an LGPL project, is being used. Hibernate is in the process of
+  relicensing to ASL v2
+- Some files, particularly test files, and those not supporting comments, may
+  be missing the ASF Licensing Header
+
+If you are planning to incorporate this work into your product/project, please
+be aware that you will need to conduct a thorough licensing review to determine
+the overall implications of including this work. For the current status of this
+project through the Apache Incubator visit:
+https://incubator.apache.org/projects/kie.html
diff --git a/packages/kogito-db-migrator-tool/env/index.js 
b/packages/kogito-db-migrator-tool/env/index.js
new file mode 100644
index 00000000000..d03521c2e5b
--- /dev/null
+++ b/packages/kogito-db-migrator-tool/env/index.js
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+const { varsWithName, composeEnv } = require("@kie-tools-scripts/build-env");
+
+module.exports = composeEnv([require("@kie-tools/root-env/env"), 
require("@kie-tools/maven-base/env")], {
+  vars: varsWithName({}),
+  get env() {
+    return {
+      kogitoDbMigratorTool: {
+        version: require("../package.json").version,
+      },
+    };
+  },
+});
diff --git a/packages/kogito-db-migrator-tool/install.js 
b/packages/kogito-db-migrator-tool/install.js
new file mode 100644
index 00000000000..1770c93869f
--- /dev/null
+++ b/packages/kogito-db-migrator-tool/install.js
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+const { env } = require("./env");
+const { setupMavenConfigFile, buildTailFromPackageJsonDependencies } = 
require("@kie-tools/maven-base");
+
+setupMavenConfigFile(
+  `
+    -Drevision=${env.kogitoDbMigratorTool.version}
+    -Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()}
+`
+);
diff --git a/packages/kogito-db-migrator-tool/package.json 
b/packages/kogito-db-migrator-tool/package.json
new file mode 100644
index 00000000000..7ca5e31839b
--- /dev/null
+++ b/packages/kogito-db-migrator-tool/package.json
@@ -0,0 +1,37 @@
+{
+  "private": true,
+  "name": "@kie-tools/kogito-db-migrator-tool",
+  "version": "0.0.0",
+  "description": "",
+  "license": "Apache-2.0",
+  "homepage": "https://github.com/apache/incubator-kie-tools";,
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/apache/incubator-kie-tools.git";
+  },
+  "bugs": {
+    "url": "https://github.com/apache/incubator-kie-tools/issues";
+  },
+  "scripts": {
+    "build:dev": "pnpm pre-build && mvn clean install -DskipTests",
+    "build:prod": "pnpm pre-build && run-script-os",
+    "build:prod:darwin:linux": "mvn clean install -DskipTests=$(build-env 
tests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)",
+    "build:prod:win32": "pnpm powershell \"mvn clean install 
`-DskipTests=$(build-env tests.run --not) 
`-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures)\"",
+    "install": "node install.js",
+    "pre-build": "mvn dependency:unpack"
+  },
+  "dependencies": {
+    "@kie-tools/maven-base": "workspace:*"
+  },
+  "devDependencies": {
+    "@kie-tools/root-env": "workspace:*",
+    "rimraf": "^3.0.2",
+    "run-script-os": "^1.1.6"
+  },
+  "kieTools": {
+    "requiredPreinstalledCliCommands": [
+      "java",
+      "mvn"
+    ]
+  }
+}
diff --git a/packages/kogito-db-migrator-tool/pom.xml 
b/packages/kogito-db-migrator-tool/pom.xml
new file mode 100644
index 00000000000..0130bd33fda
--- /dev/null
+++ b/packages/kogito-db-migrator-tool/pom.xml
@@ -0,0 +1,126 @@
+<?xml version="1.0" ?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+-->
+<project
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
https://maven.apache.org/xsd/maven-4.0.0.xsd";
+  xmlns="http://maven.apache.org/POM/4.0.0";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+>
+  <parent>
+    <groupId>org.kie</groupId>
+    <artifactId>kie-tools-maven-base</artifactId>
+    <version>${revision}</version>
+    <relativePath>./node_modules/@kie-tools/maven-base/pom.xml</relativePath>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.kie.kogito</groupId>
+  <artifactId>kogito-db-migrator-tool</artifactId>
+
+  <dependencies>
+    <dependency>
+      <groupId>io.quarkus</groupId>
+      <artifactId>quarkus-flyway</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>io.quarkus</groupId>
+      <artifactId>quarkus-jdbc-postgresql</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>io.quarkus</groupId>
+      <artifactId>quarkus-arc</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>io.quarkus</groupId>
+      <artifactId>quarkus-junit5</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-junit-jupiter</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-core</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <testSourceDirectory>src/test/java</testSourceDirectory>
+    <plugins>
+      <!-- Use mvn dependency:unpack command to unzip ddl files and mvn 
dependency:copy to copy into destination -->
+      <plugin>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <configuration>
+          <artifactItems>
+            <artifactItem>
+              <groupId>org.kie.kogito</groupId>
+              <artifactId>kogito-ddl</artifactId>
+              <version>${version.org.kie.kogito}</version>
+              <classifier>db-scripts</classifier>
+              <type>zip</type>
+              <overWrite>true</overWrite>
+              <outputDirectory>src/main/resources</outputDirectory>
+              <destFileName>kogito-ddl-db-scripts.zip</destFileName>
+              <excludes>ansi/*</excludes>
+            </artifactItem>
+          </artifactItems>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>io.quarkus</groupId>
+        <artifactId>quarkus-maven-plugin</artifactId>
+        <extensions>true</extensions>
+        <executions>
+          <execution>
+            <goals>
+              <goal>build</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <compilerArgs>
+            <arg>-parameters</arg>
+          </compilerArgs>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.jacoco</groupId>
+        <artifactId>jacoco-maven-plugin</artifactId>
+        <version> ${version.jacoco.maven.plugin} </version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>prepare-agent</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>report</id>
+            <phase>prepare-package</phase>
+            <goals>
+              <goal>report</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git 
a/packages/kogito-db-migrator-tool/src/main/java/org/kie/kogito/migrator/postgresql/DBConnectionChecker.java
 
b/packages/kogito-db-migrator-tool/src/main/java/org/kie/kogito/migrator/postgresql/DBConnectionChecker.java
new file mode 100644
index 00000000000..3fb4ea76bc9
--- /dev/null
+++ 
b/packages/kogito-db-migrator-tool/src/main/java/org/kie/kogito/migrator/postgresql/DBConnectionChecker.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.migrator.postgresql;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+import io.quarkus.logging.Log;
+
+import org.eclipse.microprofile.config.inject.ConfigProperty;
+
+import jakarta.enterprise.context.ApplicationScoped;
+
+@ApplicationScoped
+public class DBConnectionChecker {
+    @ConfigProperty(name = "quarkus.datasource.dataindex.jdbc.url")
+    String dataIndexDBURL;
+
+    @ConfigProperty(name = "quarkus.datasource.dataindex.username")
+    String dataIndexDBUserName;
+
+    @ConfigProperty(name = "quarkus.datasource.dataindex.password")
+    String dataIndexDBPassword;
+
+    @ConfigProperty(name = "quarkus.datasource.jobsservice.jdbc.url")
+    String jobsServiceDBURL;
+
+    @ConfigProperty(name = "quarkus.datasource.jobsservice.username")
+    String jobsServiceDBUserName;
+
+    @ConfigProperty(name = "quarkus.datasource.jobsservice.password")
+    String jobsServiceDBPassword;
+
+    private void checkDBConnection(String dbURL, String dbUser, String 
dbPassword) throws SQLException {
+        try (Connection db = DriverManager.getConnection(dbURL, dbUser, 
dbPassword)) {
+            Log.infof("Checking DB connection: %s - success", dbURL);
+        } catch (SQLException sqe) {
+            Log.infof("Checking DB connection %s- failed", dbURL);
+            throw sqe;
+        }
+    }
+
+    public void checkDataIndexDBConnection() throws SQLException {
+        checkDBConnection(dataIndexDBURL, dataIndexDBUserName, 
dataIndexDBPassword);
+    }
+
+    public void checkJobsServiceDBConnection() throws SQLException {
+        checkDBConnection(jobsServiceDBURL, jobsServiceDBUserName, 
jobsServiceDBPassword);
+    }
+}
diff --git 
a/packages/kogito-db-migrator-tool/src/main/java/org/kie/kogito/migrator/postgresql/DBMigrator.java
 
b/packages/kogito-db-migrator-tool/src/main/java/org/kie/kogito/migrator/postgresql/DBMigrator.java
new file mode 100644
index 00000000000..9031a4365f2
--- /dev/null
+++ 
b/packages/kogito-db-migrator-tool/src/main/java/org/kie/kogito/migrator/postgresql/DBMigrator.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.migrator.postgresql;
+
+import io.quarkus.runtime.Quarkus;
+import io.quarkus.runtime.QuarkusApplication;
+import io.quarkus.runtime.annotations.QuarkusMain;
+import jakarta.inject.Inject;
+import io.quarkus.logging.Log;
+import org.flywaydb.core.api.FlywayException;
+
+import java.sql.SQLException;
+
+import org.eclipse.microprofile.config.inject.ConfigProperty;
+
+@QuarkusMain
+public class DBMigrator implements QuarkusApplication {
+
+    private int SUCCESS_DB_MIGRATION = 0;
+    private int ERR_DATA_INDEX_DB_CONN = -1;
+    private int ERR_JOBS_SERVICE_DB_CONN = -2;
+    private int ERR_DATA_INDEX_MIGRATION = -3;
+    private int ERR_JOBS_SERVICE_MIGRATION = -4;
+
+    @Inject
+    MigrationService service;
+
+    @Inject
+    DBConnectionChecker dbConnectionChecker;
+
+    @ConfigProperty(name = "migrate.db.dataindex")
+    Boolean migrateDataIndex;
+
+    @ConfigProperty(name = "migrate.db.jobsservice")
+    Boolean migrateJobsService;
+
+    @Override
+    public int run(String... args) {
+        if (migrateDataIndex) {
+            try {
+                dbConnectionChecker.checkDataIndexDBConnection();
+            } catch (SQLException e) {
+                Log.error( "Error obtaining data index database connection. 
Cannot proceed, exiting.");
+                Quarkus.asyncExit(ERR_DATA_INDEX_DB_CONN);
+                return ERR_DATA_INDEX_DB_CONN;
+            }
+
+            try{
+                service.migrateDataIndex();
+            } catch ( FlywayException fe ){
+                Log.error( "Error migrating data index database, flyway 
service exception occured, please check logs.");
+                Quarkus.asyncExit(ERR_DATA_INDEX_MIGRATION);
+                return ERR_DATA_INDEX_MIGRATION;
+            }
+        }
+
+        if (migrateJobsService) {
+            try {
+                dbConnectionChecker.checkJobsServiceDBConnection();
+            } catch (SQLException e) {
+                Log.error( "Error obtaining jobs service database connection. 
Cannot proceed, exiting.");
+                Quarkus.asyncExit(ERR_JOBS_SERVICE_DB_CONN);
+                return ERR_JOBS_SERVICE_DB_CONN;
+            }
+
+            try{
+                service.migrateJobsService();
+            } catch ( FlywayException fe ){
+                Log.error( "Error migrating jobs service database, flyway 
service exception occured, please check logs.");
+                Quarkus.asyncExit(ERR_JOBS_SERVICE_MIGRATION);
+                return ERR_JOBS_SERVICE_MIGRATION;
+            }
+        }
+
+        Quarkus.asyncExit(SUCCESS_DB_MIGRATION);
+        return SUCCESS_DB_MIGRATION;
+    }
+}
\ No newline at end of file
diff --git 
a/packages/kogito-db-migrator-tool/src/main/java/org/kie/kogito/migrator/postgresql/MigrationService.java
 
b/packages/kogito-db-migrator-tool/src/main/java/org/kie/kogito/migrator/postgresql/MigrationService.java
new file mode 100644
index 00000000000..aa94833aba5
--- /dev/null
+++ 
b/packages/kogito-db-migrator-tool/src/main/java/org/kie/kogito/migrator/postgresql/MigrationService.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+ package org.kie.kogito.migrator.postgresql;
+
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.inject.Inject;
+import io.quarkus.logging.Log;
+
+import org.eclipse.microprofile.config.inject.ConfigProperty;
+import org.flywaydb.core.Flyway;
+
+import io.quarkus.flyway.FlywayDataSource;
+
+@ApplicationScoped
+public class MigrationService {
+    @Inject
+    @FlywayDataSource("dataindex") 
+    Flyway flywayDataIndex;
+
+    @Inject
+    @FlywayDataSource("jobsservice") 
+    Flyway flywayJobsService;
+
+    @ConfigProperty(name = "quarkus.flyway.dataindex.clean-at-start")
+    Boolean cleanDataIndex;
+
+    @ConfigProperty(name = "quarkus.flyway.jobsservice.clean-at-start")
+    Boolean cleanJobsService;
+
+    private void migrateDB(Flyway flywayService, Boolean clean, String 
serviceName) {
+        Log.info("Migrating " + serviceName);
+        if (clean) {
+            Log.info("Cleaned the " + serviceName);
+            flywayService.clean();
+        }
+        flywayService.migrate();
+        if (flywayService.info() != null) {
+            Log.info("Migrated to version " + 
flywayService.info().current().toString());
+        }
+    }
+
+    public void migrateDataIndex() {
+        migrateDB(flywayDataIndex, cleanDataIndex, "data-index");
+    }
+
+    public void migrateJobsService() {
+        migrateDB(flywayJobsService, cleanJobsService, "jobs-service");
+    }
+}
\ No newline at end of file
diff --git 
a/packages/kogito-db-migrator-tool/src/main/resources/application.properties 
b/packages/kogito-db-migrator-tool/src/main/resources/application.properties
new file mode 100644
index 00000000000..5f18a83ff28
--- /dev/null
+++ b/packages/kogito-db-migrator-tool/src/main/resources/application.properties
@@ -0,0 +1,40 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# Data Index data source
+migrate.db.dataindex=false
+quarkus.datasource.dataindex.db-kind=postgresql
+quarkus.datasource.dataindex.username=postgres
+quarkus.datasource.dataindex.password=postgres
+quarkus.datasource.dataindex.jdbc.url=jdbc:postgresql://localhost:5432/postgres
+quarkus.flyway.dataindex.locations=classpath:postgresql/data-index
+quarkus.flyway.dataindex.schemas=data-index-service
+quarkus.flyway.dataindex.migrate-at-start=false
+quarkus.flyway.dataindex.clean-at-start=false
+
+# Jobs Service data source
+migrate.db.jobsservice=false
+quarkus.datasource.jobsservice.db-kind=postgresql
+quarkus.datasource.jobsservice.username=postgres
+quarkus.datasource.jobsservice.password=postgres
+quarkus.datasource.jobsservice.jdbc.url=jdbc:postgresql://localhost:5432/postgres
+quarkus.flyway.jobsservice.locations=classpath:postgresql/jobs-service
+quarkus.flyway.jobsservice.schemas=jobs-service
+quarkus.flyway.jobsservice.migrate-at-start=false
+quarkus.flyway.jobsservice.clean-at-start=false
\ No newline at end of file
diff --git 
a/packages/kogito-db-migrator-tool/src/test/java/org/kie/kogito/migrator/postgresql/DBConnectionCheckerTest.java
 
b/packages/kogito-db-migrator-tool/src/test/java/org/kie/kogito/migrator/postgresql/DBConnectionCheckerTest.java
new file mode 100644
index 00000000000..0393c226c6b
--- /dev/null
+++ 
b/packages/kogito-db-migrator-tool/src/test/java/org/kie/kogito/migrator/postgresql/DBConnectionCheckerTest.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License. 
+ */
+
+package org.kie.kogito.migrator.postgresql;
+
+import io.quarkus.test.Mock;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.mockito.Mockito;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.Mockito.mockStatic;
+
+class DBConnectionCheckerTest {
+    DBConnectionChecker dbConnectionChecker = new DBConnectionChecker();
+
+    @Mock
+    static DriverManager driverManager;
+
+    @BeforeAll
+    static void init() {
+        mockStatic(DriverManager.class);
+    }
+
+    @BeforeEach
+    void setupEach() {
+        dbConnectionChecker.dataIndexDBURL = 
"jdbc:postgresql://db-service:5432/di";
+        dbConnectionChecker.dataIndexDBUserName = "postgres";
+        dbConnectionChecker.dataIndexDBPassword = "postgres";
+
+        dbConnectionChecker.jobsServiceDBURL = 
"jdbc:postgresql://db-service:5432/js";
+        dbConnectionChecker.jobsServiceDBUserName = "postgres";
+        dbConnectionChecker.jobsServiceDBPassword = "postgres";
+    }
+
+    @Test
+    void testCheckDBConnections() throws SQLException {
+        Mockito.when(driverManager.getConnection(anyString(), anyString(), 
anyString())).thenReturn(Mockito.mock(Connection.class));
+        assertDoesNotThrow(() -> 
dbConnectionChecker.checkDataIndexDBConnection());
+        assertDoesNotThrow(() -> 
dbConnectionChecker.checkJobsServiceDBConnection());
+    }
+
+    @Test
+    void testCheckDBConnectionsThrowSQLException() throws SQLException {
+        Mockito.when(driverManager.getConnection(anyString(), anyString(), 
anyString())).thenThrow(SQLException.class);
+        assertThrows(SQLException.class, () -> 
dbConnectionChecker.checkDataIndexDBConnection());
+        assertThrows(SQLException.class, () -> 
dbConnectionChecker.checkJobsServiceDBConnection());
+    }
+}
diff --git 
a/packages/kogito-db-migrator-tool/src/test/java/org/kie/kogito/migrator/postgresql/DBMigratorTest.java
 
b/packages/kogito-db-migrator-tool/src/test/java/org/kie/kogito/migrator/postgresql/DBMigratorTest.java
new file mode 100644
index 00000000000..eb431bc168d
--- /dev/null
+++ 
b/packages/kogito-db-migrator-tool/src/test/java/org/kie/kogito/migrator/postgresql/DBMigratorTest.java
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License. 
+ */
+
+package org.kie.kogito.migrator.postgresql;
+
+import io.quarkus.test.Mock;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import java.sql.SQLException;
+
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.times;
+
+class DBMigratorTest {
+
+    @Mock
+    MigrationService migrationService;
+
+    @Mock
+    DBConnectionChecker dbConnectionChecker;
+
+    DBMigrator dbMigrator = new DBMigrator();
+
+    @BeforeEach
+    void setupEach() {
+        migrationService = mock(MigrationService.class);
+        dbConnectionChecker = mock(DBConnectionChecker.class);
+    }
+
+    @Test
+    void testMigratorWithNoMigrations() throws Exception {
+        dbMigrator.migrateDataIndex = false;
+        dbMigrator.migrateJobsService = false;
+
+        dbMigrator.run();
+        verify(dbConnectionChecker, times(0)).checkDataIndexDBConnection();
+        verify(dbConnectionChecker, times(0)).checkJobsServiceDBConnection();
+        verify(migrationService, times(0)).migrateDataIndex();
+        verify(migrationService, times(0)).migrateJobsService();
+    }
+
+    @Test
+    void testMigratorWithAllMigrations() throws Exception {
+        dbMigrator.migrateDataIndex = true;
+        dbMigrator.migrateJobsService = true;
+        dbMigrator.dbConnectionChecker = dbConnectionChecker;
+        dbMigrator.service = migrationService;
+
+        dbMigrator.run();
+        verify(dbConnectionChecker, times(1)).checkDataIndexDBConnection();
+        verify(dbConnectionChecker, times(1)).checkJobsServiceDBConnection();
+        verify(migrationService, times(1)).migrateDataIndex();
+        verify(migrationService, times(1)).migrateJobsService();
+    }
+
+    @Test
+    void testDataIndexMigrationWithException() throws Exception {
+        dbMigrator.migrateDataIndex = true;
+        dbMigrator.migrateJobsService = false;
+        dbMigrator.dbConnectionChecker = dbConnectionChecker;
+        dbMigrator.service = migrationService;
+
+        doThrow(new 
SQLException()).when(dbConnectionChecker).checkDataIndexDBConnection();
+
+        dbMigrator.run();
+        verify(migrationService, times(0)).migrateDataIndex();
+        verify(migrationService, times(0)).migrateJobsService();
+    }
+
+    @Test
+    void testJobsServiceWithException() throws Exception {
+        dbMigrator.migrateDataIndex = false;
+        dbMigrator.migrateJobsService = true;
+        dbMigrator.dbConnectionChecker = dbConnectionChecker;
+        dbMigrator.service = migrationService;
+
+        doThrow(new 
SQLException()).when(dbConnectionChecker).checkJobsServiceDBConnection();
+
+        dbMigrator.run();
+        verify(migrationService, times(0)).migrateDataIndex();
+        verify(migrationService, times(0)).migrateJobsService();
+    }
+}
diff --git 
a/packages/kogito-db-migrator-tool/src/test/java/org/kie/kogito/migrator/postgresql/MigrationServiceTest.java
 
b/packages/kogito-db-migrator-tool/src/test/java/org/kie/kogito/migrator/postgresql/MigrationServiceTest.java
new file mode 100644
index 00000000000..bce5e4f88c1
--- /dev/null
+++ 
b/packages/kogito-db-migrator-tool/src/test/java/org/kie/kogito/migrator/postgresql/MigrationServiceTest.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License. 
+ */
+
+package org.kie.kogito.migrator.postgresql;
+
+import io.quarkus.test.Mock;
+import org.flywaydb.core.Flyway;
+import org.flywaydb.core.api.output.CleanResult;
+import org.flywaydb.core.api.output.MigrateResult;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.times;
+
+class MigrationServiceTest {
+    @Mock
+    Flyway flyway;
+
+    MigrationService migrationService = new MigrationService();
+
+    @BeforeEach
+    void setupEach() {
+        flyway = mock(Flyway.class);
+        when(flyway.migrate()).thenReturn(new MigrateResult("flywayVersion", 
"db", "schema"));
+        when(flyway.clean()).thenReturn(new CleanResult("flywayVersion", 
"db"));
+    }
+
+    @Test
+    void testMigrateDataIndexWithNoClean() {
+        migrationService.cleanDataIndex = false;
+        migrationService.flywayDataIndex = flyway;
+        migrationService.migrateDataIndex();
+        verify(flyway, times(1)).migrate();
+    }
+
+    @Test
+    void testMigrateDataIndexWithClean() {
+        migrationService.cleanDataIndex = true;
+        migrationService.flywayDataIndex = flyway;
+        migrationService.migrateDataIndex();
+        verify(flyway, times(1)).clean();
+        verify(flyway, times(1)).migrate();
+    }
+
+    @Test
+    void testMigrateJobsServiceWithNoClean() {
+        migrationService.cleanJobsService = false;
+        migrationService.flywayJobsService = flyway;
+        migrationService.migrateJobsService();
+        verify(flyway, times(1)).migrate();
+    }
+
+    @Test
+    void testMigrateJobsServiceWithClean() {
+        migrationService.cleanJobsService = true;
+        migrationService.flywayJobsService = flyway;
+        migrationService.migrateJobsService();
+        verify(flyway, times(1)).clean();
+        verify(flyway, times(1)).migrate();
+    }
+}
diff --git a/packages/maven-base/pom.xml b/packages/maven-base/pom.xml
index 5b47f83731e..c9321c8e3d0 100644
--- a/packages/maven-base/pom.xml
+++ b/packages/maven-base/pom.xml
@@ -138,6 +138,7 @@
     <version.org.mockito>4.11.0</version.org.mockito>
     
<version.org.kie.j2cl.tools.yaml.mapper>0.4</version.org.kie.j2cl.tools.yaml.mapper>
     <version.j2cl.maven.plugin>0.23.0</version.j2cl.maven.plugin>
+    <version.jacoco.maven.plugin>0.8.12</version.jacoco.maven.plugin>
   </properties>
 
   <dependencyManagement>
diff --git 
a/packages/sonataflow-image-common/resources/scripts/build-kogito-apps-components.sh
 
b/packages/sonataflow-image-common/resources/scripts/build-kogito-apps-components.sh
index 12a2f50f03c..fc661b7dcdc 100755
--- 
a/packages/sonataflow-image-common/resources/scripts/build-kogito-apps-components.sh
+++ 
b/packages/sonataflow-image-common/resources/scripts/build-kogito-apps-components.sh
@@ -56,6 +56,9 @@ if [ ! -z "${CYPRESS_BINARY_URL}" ]; then
 fi
 
 case ${imageName} in
+    "incubator-kie-kogito-db-migrator-tool")
+        contextDir="db-migrator-tool/image"
+        ;;
     "incubator-kie-kogito-data-index-ephemeral")
         contextDir="data-index/data-index-service/data-index-service-inmemory"
         ;;
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index e0a53081c63..0baac5f293f 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -7305,6 +7305,50 @@ importers:
         specifier: ^1.1.6
         version: 1.1.6
 
+  packages/kogito-db-migrator-tool:
+    dependencies:
+      '@kie-tools/maven-base':
+        specifier: workspace:*
+        version: link:../maven-base
+    devDependencies:
+      '@kie-tools/root-env':
+        specifier: workspace:*
+        version: link:../root-env
+      rimraf:
+        specifier: ^3.0.2
+        version: 3.0.2
+      run-script-os:
+        specifier: ^1.1.6
+        version: 1.1.6
+
+  packages/kogito-db-migrator-tool-image:
+    dependencies:
+      '@kie-tools/kogito-db-migrator-tool':
+        specifier: workspace:*
+        version: link:../kogito-db-migrator-tool
+      '@kie-tools/python-venv':
+        specifier: workspace:*
+        version: link:../python-venv
+      '@kie-tools/root-env':
+        specifier: workspace:*
+        version: link:../root-env
+      '@kie-tools/sonataflow-image-common':
+        specifier: workspace:*
+        version: link:../sonataflow-image-common
+    devDependencies:
+      cross-env:
+        specifier: ^7.0.3
+        version: 7.0.3
+      replace-in-file:
+        specifier: ^7.1.0
+        version: 7.1.0
+      rimraf:
+        specifier: ^3.0.2
+        version: 3.0.2
+      run-script-os:
+        specifier: ^1.1.6
+        version: 1.1.6
+
   packages/kogito-jit-runner-image:
     devDependencies:
       '@kie-tools/maven-base':
@@ -24452,6 +24496,7 @@ packages:
   [email protected]:
     resolution: {integrity: 
sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==}
     engines: {node: '>=12'}
+    deprecated: Glob versions prior to v9 are no longer supported
 
   [email protected]:
     resolution: {integrity: 
sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==}
@@ -24967,6 +25012,7 @@ packages:
 
   [email protected]:
     resolution: {integrity: 
sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==}
+    deprecated: This module is not supported, and leaks memory. Do not use it. 
Check out lru-cache if you want a good and tested way to coalesce async 
requests by a key value, which is much more comprehensive and powerful.
 
   [email protected]:
     resolution: {integrity: 
sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==}
diff --git a/repo/graph.dot b/repo/graph.dot
index 52dde62ecc4..903fcd6f8e7 100644
--- a/repo/graph.dot
+++ b/repo/graph.dot
@@ -151,6 +151,8 @@ digraph G {
   "@kie-tools/sonataflow-image-common" [ color = "black", fontcolor = "black", 
style = "dashed, rounded" ];
   "@kie/kogito-data-index-ephemeral-image" [ color = "black", fontcolor = 
"black", style = "dashed, rounded" ];
   "@kie/kogito-data-index-postgresql-image" [ color = "black", fontcolor = 
"black", style = "dashed, rounded" ];
+  "@kie-tools/kogito-db-migrator-tool" [ color = "black", fontcolor = "black", 
style = "dashed, rounded" ];
+  "@kie-tools/kogito-db-migrator-tool-image" [ color = "black", fontcolor = 
"black", style = "dashed, rounded" ];
   "@kie/kogito-jit-runner-image" [ color = "black", fontcolor = "black", style 
= "dashed, rounded" ];
   "@kie/kogito-jobs-service-allinone-image" [ color = "black", fontcolor = 
"black", style = "dashed, rounded" ];
   "@kie/kogito-jobs-service-ephemeral-image" [ color = "black", fontcolor = 
"black", style = "dashed, rounded" ];
@@ -472,6 +474,9 @@ digraph G {
   "@kie/kogito-data-index-ephemeral-image" -> 
"@kie-tools/sonataflow-image-common" [ style = "dashed", color = "black" ];
   "@kie/kogito-data-index-postgresql-image" -> "@kie-tools/maven-base" [ style 
= "dashed", color = "black" ];
   "@kie/kogito-data-index-postgresql-image" -> 
"@kie-tools/sonataflow-image-common" [ style = "dashed", color = "black" ];
+  "@kie-tools/kogito-db-migrator-tool" -> "@kie-tools/maven-base" [ style = 
"solid", color = "black" ];
+  "@kie-tools/kogito-db-migrator-tool-image" -> 
"@kie-tools/kogito-db-migrator-tool" [ style = "solid", color = "black" ];
+  "@kie-tools/kogito-db-migrator-tool-image" -> 
"@kie-tools/sonataflow-image-common" [ style = "solid", color = "black" ];
   "@kie/kogito-jit-runner-image" -> "@kie-tools/maven-base" [ style = 
"dashed", color = "black" ];
   "@kie/kogito-jit-runner-image" -> "@kie-tools/sonataflow-image-common" [ 
style = "dashed", color = "black" ];
   "@kie/kogito-jobs-service-allinone-image" -> "@kie-tools/maven-base" [ style 
= "dashed", color = "black" ];
diff --git a/repo/graph.json b/repo/graph.json
index bb756252ff8..18dcb64e804 100644
--- a/repo/graph.json
+++ b/repo/graph.json
@@ -194,6 +194,8 @@
       { "id": "@kie/kogito-base-builder-image" },
       { "id": "@kie-tools/sonataflow-image-common" },
       { "id": "@kie-tools/python-venv" },
+      { "id": "@kie-tools/kogito-db-migrator-tool" },
+      { "id": "@kie-tools/kogito-db-migrator-tool-image" },
       { "id": "@kie/kogito-jit-runner-image" },
       { "id": "@kie/kogito-jobs-service-allinone-image" },
       { "id": "@kie-tools/unitables" },
@@ -2132,6 +2134,21 @@
         "target": "@kie-tools/root-env",
         "weight": 1
       },
+      {
+        "source": "@kie-tools/kogito-db-migrator-tool",
+        "target": "@kie-tools/maven-base",
+        "weight": 1
+      },
+      {
+        "source": "@kie-tools/kogito-db-migrator-tool-image",
+        "target": "@kie-tools/kogito-db-migrator-tool",
+        "weight": 1
+      },
+      {
+        "source": "@kie-tools/kogito-db-migrator-tool-image",
+        "target": "@kie-tools/sonataflow-image-common",
+        "weight": 1
+      },
       {
         "source": "@kie/kogito-jit-runner-image",
         "target": "@kie-tools/maven-base",
@@ -2836,6 +2853,8 @@
     ["@kie/kogito-base-builder-image", "packages/kogito-base-builder-image"],
     ["@kie/kogito-data-index-ephemeral-image", 
"packages/kogito-data-index-ephemeral-image"],
     ["@kie/kogito-data-index-postgresql-image", 
"packages/kogito-data-index-postgresql-image"],
+    ["@kie-tools/kogito-db-migrator-tool", "packages/kogito-db-migrator-tool"],
+    ["@kie-tools/kogito-db-migrator-tool-image", 
"packages/kogito-db-migrator-tool-image"],
     ["@kie/kogito-jit-runner-image", "packages/kogito-jit-runner-image"],
     ["@kie/kogito-jobs-service-allinone-image", 
"packages/kogito-jobs-service-allinone-image"],
     ["@kie/kogito-jobs-service-ephemeral-image", 
"packages/kogito-jobs-service-ephemeral-image"],


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to