Skip to main content
Version: 6.11.0

Create Database Schema

The internal directory structure of the extracted Portal and the migration scripts directory must be preserved, otherwise the Portal may not be able to work as expected.

Regardless of the chosen DB vendor, the methods to create the database schema and populate the tables are identical. Inside the Portal, there is a /flyway directory that contains the tool the user should use for this. If the database configuration is different than the one provided by default (i.e. PostgreSQL), then flyway/conf/flyway.conf needs to be updated with the correct connection parameters.


  1. Update flyway/conf/flyway.conf file with the database connection parameters if the database configuration is different than the following one provided by default.

    # Update the URL and Credentials for PostgreSQL
    flyway.url=jdbc:postgresql://127.0.0.1/portal
    flyway.user=portal_db_user
    flyway.password=portal_db_password
  2. In addition to this, only in case of using Oracle as database vendor, the user needs to change the parameter flyway.locations of the aforementioned file to:

    flyway.locations=filesystem:./migration-oracle
  3. Run the following command once flyway.conf file contains the correct information, :

    $ /opt/waratek/flyway/flyway clean migrate

This command will drop every table and delete all data on the schema provided in flyway.conf. Therefore, please ensure that the flyway.conf file contains only the MC database connection details.

  1. System would print:

    Successfully applied X migration to schema "public"

    where X is the total number of files inside the migration folder that corresponds to the database vendor

Repairing failed flyway migrations

For information on repairing failed flyway migrations - please see Repairing failed Flyway migrations