--- /dev/null
+#!/bin/sh
+# ============LICENSE_START====================================================
+#  Copyright (C) 2021 Nordix Foundation.
+# =============================================================================
+# Licensed 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END======================================================
+
+export POLICY_HOME=/opt/app/policy
+export SQL_USER=${MYSQL_USER}
+export SQL_PASSWORD=${MYSQL_PASSWORD}
+
+/opt/app/policy/bin/prepare_upgrade.sh ${SQL_DB}
+
+/opt/app/policy/bin/db-migrator -s ${SQL_DB} -o report
+
+/opt/app/policy/bin/db-migrator -s ${SQL_DB} -o upgrade
+rc=$?
+
+/opt/app/policy/bin/db-migrator -s ${SQL_DB} -o report
+
+nc -l -p 6824
+
+exit $rc
 
 # ============LICENSE_START====================================================
 #  Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
+#  Modification Copyright 2021. Nordix Foundation.
 # =============================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 POLICY_CLAMP_VERSION=$(getVersion clamp)
 export POLICY_CLAMP_VERSION=${POLICY_CLAMP_VERSION:0:5}-SNAPSHOT-latest
 echo POLICY_CLAMP_VERSION=${POLICY_CLAMP_VERSION}
+
+POLICY_DOCKER_VERSION=$(getVersion docker)
+export POLICY_DOCKER_VERSION=${POLICY_DOCKER_VERSION:0:5}-SNAPSHOT-latest
+echo POLICY_DOCKER_VERSION=${POLICY_DOCKER_VERSION}
 
 # ===========LICENSE_START====================================================
 #  Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
 #  Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
+#  Modification Copyright 2021. Nordix Foundation.
 # ============================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
          - ./config/db:/docker-entrypoint-initdb.d:ro
       expose:
        - 3306
+   policy-db-migrator:
+      image: nexus3.onap.org:10001/onap/policy-db-migrator:${POLICY_DOCKER_VERSION}
+      container_name: policy-db-migrator
+      hostname: policy-db-migrator
+      depends_on:
+        - mariadb
+      expose:
+       - 6824
+      env_file: config/db/db.conf
+      environment:
+        SQL_DB: policyadmin
+        SQL_HOST: mariadb
+      volumes:
+         - ./db_migrator_policy_init.sh:/opt/app/policy/bin/db_migrator_policy_init.sh:ro
+         - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
+      entrypoint: /opt/app/policy/bin/wait_for_port.sh
+      command: [
+              '-c',
+                '/opt/app/policy/bin/db_migrator_policy_init.sh',
+                'mariadb', '3306'
+               ]
    simulator:
       image: nexus3.onap.org:10001/onap/policy-models-simulator:${POLICY_MODELS_VERSION}
       container_name: simulator
       image: nexus3.onap.org:10001/onap/policy-api:${POLICY_API_VERSION}
       container_name: policy-api
       depends_on:
-       - mariadb
+       - policy-db-migrator
       hostname: policy-api
       expose:
        - 6969
       entrypoint: ./wait_for_port.sh
       command: [
         '-c', './policy-api.sh',
-        'mariadb', '3306'
+        'mariadb', '3306',
+        'policy-db-migrator', '6824'
         ]
    pap:
       image: nexus3.onap.org:10001/onap/policy-pap:${POLICY_PAP_VERSION}