6.4. Model fix tool

Sometimes, during the loading of a database model, an error message like the image below can be raised by pgModeler. This error happens mainly because the user ignored the model validation warnings and saved the model or loaded a file that was generated in an older version of pgModeler and contains some incompatibilities with the current version. In both cases, the file is corrupted and will be loadable again only if a set of patches are applied to the file.

Originally, this model fix feature was implemented only in the command-line interface version of pgModeler but in order to facilitate the interaction with the user, a graphical interface to the command-line tool was implemented resulting in the dialog shown below. The only task executed by this dialog is to take an input model file (the broken one), and an output file (where the fixed model will be stored), and call the command-line interface to do the fix job. The user is able to follow the whole process on the console-like field located at the base of the dialog.

It is possible to use this dialog anytime, not necessarily only on loading errors. If you have broken models and want to fix them before the loading just click the icon on the control toolbar (at the left side of the main window) to bring the fix menu and then click Fix > Model's structure. The available fields of the dialog are detailed below.

Option/Field Description
Input file The broken model file to be fixed.
Output file The file in which the fixed database model will be stored.
Fix tries The number of tries executed by the fix process. Generally, there's no need to change the value of this field but depending on the model arrangement and size you can increase this value in order to correctly fix the broken model.
Load fixed model when finish This option, when checked, causes pgModeler to load the fixed model when the process is finished.

Jun 16, 2023 at 10:27