AppMill Documentation : DB Schema Comparison

Access

Click Features > DB Schema Comparison to compare two databases.

Table of Contents

Overview

The Database Schema comparison functionality is designed to compare two database schemas - a source database and a destination database. As a comparison result, the user will view the differences (missing/new columns, updated column type, missing/new constraints, etc.). The functionality allows the user to select which updates should be executed on the destination database, to execute the selected updates, to see the result on UI.

The rows in this table will be created and updated automatically, when a user compares or synchronizes two databases.

Search

To search for a database comparison records or filter the search results, use the following search filters: ID, User, Params Source, Params Destination, Compare Data, Result.

After filling in the filters, click the Enter key or any screen place. The screen displays search results if found. Please note, that letters or part of the word entered in the search filter fields will be taken into account while searching as well.

Sort Results

You can sort search results by the columns in ascending (arranged from the smallest to the largest number and alphabetically for letters) or descending (arranged from the largest to the smallest number and in reverse alphabetical order for letters) order. Columns' names, by which search results can be sorted, are indicated with arrows. Click the appropriate column name to sort search results by it.

Navigate

Use the navigation bar at the bottom of the Custom Query Overview page to navigate through the pages. Click the appropriate page number to open it. Use the Arrow icons to go to the next page of the previous page of the search results list accordingly. 

Click the Show All button to display all the results on one page.

Create DB Schema Comparison

To compare two databases, click the New Comparison button. This opens the Create DB schema comparison page with Source and Destination databases forms to be filled in:

Select the Database Type from the drop-down menu. Currently, four database types are supported:

  • PostgreSQL

  • OracleSQL

  • MicrosoftSQL

  • MySQL

Fill in the following parameters for every database (Source and Destination):

  • Host - define the host where the database is stored.

  • Port - define the port where the database is stored.

  • Database Name - enter the database name.

  • User - enter the user who has the access to the database.

  • Password - enter the password used to access the database.

After filling in all the fields, click the Compare Database Schema button below the forms.
The result of the databases comparison is displayed below the forms:

You can review the list of differences between two schemas in the result table. In the Additional Info column, you find the explanation about the changes that will apply to the Destination database if you select the record for synchronization.

To select the items to be synchronized, check the appropriate check boxes and click the Synchronize Database Schema button:

After successful synchronization and the applied changes, this entry will not be available for selection.

The next time that you compare these two databases, the applied changes will not be shown in the list of differences.

Update DB Comparison Record

To update a DB Comparison record, click the Edit (pencil) icon for the selected entry in the search results table. The DB Schema Comparison page opens for editing.

Here you can compare or synchronize two databases again.

To return to the Overview page, click the Back button. 

Delete DB Comparison Record

To delete a DB Comparison record, click the Delete icon on the Overview page. The confirmation pop-up will appear where you can confirm or cancel the action.