Skip to main content
Version: 2.0.0 (latest)

5. Introduction

The main pgModeler feature, the database modeling, would be almost useless if the export, import, and diff didn't exist. This is because often the user who is working on a database model needs to do real tests of the structure being created by exporting the model to a server to make the needed validations. In other moments, the user needs to generate a graphical representation from an existing database that was not generated from a model, so reverse engineering will be used to achieve the desired result.

Now, to keep any changes synchronized between the model and the database, or even between two databases, the user will need to run the diff process, which will analyze them, pointing out any divergences and generating the needed code to keep the involved entities in sync. For those reasons, these features are of great importance in the modeling process as a whole.

Since some of these operations are “invasive” to the database, to be able to execute them without any issues, at least one connection must be configured with a privileged user. A privileged user is not necessarily the superuser, but a role that is capable of creating a database (for the export process) and with privileges to read the system catalogs (for import and diff). Refer to the previous chapter, section Connections settings, to see how to configure connections in pgModeler.

These features are available as views of the main window, selected in the views bar: Export, Import and Diff (the last two are Plus features). The shortcuts of the import and diff views are Ctrl+Shift+I and Ctrl+Shift+D, respectively. The export view requires at least one model loaded in the Design view, and both the export and diff views take the model to be handled from the list of the loaded ones.