11.10 Modifying Liquibase Tables

Filr ships with Liquibase scripts that validate database schema, keep track of schema changes, compare changes with the reference database, and so forth. In order to use these scripts, the Liquibase tables need to be deleted and re-created. (This is because the Liquibase tables contain metadata specific for the MySQL database that you are migrating from.)

You need to remove the MySQL tables and create new tables that are compatible with the Microsoft SQL database.

  1. Delete the Liquibase tables (databasechangelog and databasechangeloglock) from the migrated MSSQL database.

  2. Modify the sqlserver-liquibase.properties file and set the database password to be clear text so that it can be read by the Liquibase scripts:

    1. SSH to the Filr appliance and log in to the appliance as the root user.

    2. In the console of the Filr appliance, change to the /filrinstall/db directory.

    3. Make a copy of the sqlserver-liquibase.properties file.

      For example, to copy the file to the root partition:

      cp sqlserver-liquibase.properties /

    4. Open the sqlserver-liquibase.properties file in a text editor.

      For example, you can use the vi Editor to edit the file:

      vi sqlserver-liquibase.properties

    5. Change the password value to the password of the Microsoft SQL database.

    6. Save and close the sqlserver-liquibase.properties file.

      In the vi Editor, you can type the following command when in command mode:

      :wq

  3. Run the manage-database.sh script with the markDatabaseAsUpdated switch.

    This creates the Liquibase tables and populates them with the definitions read from the Microsoft SQL version of the changelog files that are available in the Filr installation directory.

    To run the manage-database.sh script with the markDatabaseAsUpdated switch:

    1. SSH to the Filr appliance and log in to the appliance as the root user.

    2. Run following commands:

      cd /filrinstall/db

      sh /filrinstall/db/manage-database.sh sqlserver markDatabaseAsUpdated

  4. Perform the final validation by running manage-database.sh with the updateDatabase switch.

    To run the manage-database.sh script with the updateDatabase switch:

    1. SSH to the Filr appliance and log in to the appliance as the root user.

    2. Get Executable permission to the manage-database.sh script by running the following commands:

      cd /filrinstall/db/

      chmod x+ manage-database.sh

    3. Run following commands:

      sh /filrinstall/db/manage-database.sh sqlserver updateDatabase

      sh /filrinstall/db/manage-database.sh sqlserver validate

    The Liquibase script should find no need to perform any further schema changes, and this run should complete without making any changes and without any errors.

  5. Replace the sqlserver-liquibase.properties file that you edited in Step 2.d with the one that you copied in Step 2.c.

  6. Start the Filr service on any Filr appliances in the Filr system, as described in Managing System Services in the Filr 3.4.1: Administrative UI Reference.

  7. Users can now access the Filr site at port 8443.

    For example, https://ip_address_or_DNS:8443