1.1.6 Install pgModeler for designing the data model of BOA - Daniel-Brosnan-Blazquez/vboa GitHub Wiki
Introduction
This procedure covers the action to install the tool pgModeler.
This tool is used to design the data model of BOA.
Estimated duration
4 hours.
Pre-conditions
- An available BOA development environment is ready to use.
Procedure
- Open a terminal and access as root
su -
or
sudo su -
- Install Qt from the available packages:
apt-get install qt5-default
apt-get install libqt5svg5-dev
- Make sure Qt has been installed:
qmake -version
- Install pkg-config from the available packages:
apt-get install pkg-config
- Install libxml2-dev from the available packages:
apt-get install libxml2-dev
- Make sure pkg-config and libxml2-dev are installed:
pkg-config libxml-2.0 --cflags --libs
- Install libpq-dev from the available packages:
apt-get install libpq-dev
-
Download the pgModeler software from the page by clicking on "Download", then on "Source" and then selecting the latest stable release (no alpha, no beta) and clicking on "Get source":
-
Extract the package and go to the extracted folder:
IMPORTANT NOTE: replace PATH_TO_PGMODELER_PACKAGE and NAME_OF_PGMODELER_PACKAGE with the relevant values
cd PATH_TO_PGMODELER_PACKAGE
tar xzvf NAME_OF_PGMODELER_PACKAGE
-
Build the software downloaded from the pgModeler page:
IMPORTANT NOTE: replace PATH_TO_EXTRACTED_PGMODELER_PACKAGE with the relevant value
cd PATH_TO_EXTRACTED_PGMODELER_PACKAGE
export INSTALLATION_ROOT=/opt/pgmodeler
qmake -r CONFIG+=release PREFIX=$INSTALLATION_ROOT BINDIR=$INSTALLATION_ROOT PRIVATEBINDIR=$INSTALLATION_ROOT PRIVATELIBDIR=$INSTALLATION_ROOT/lib pgmodeler.pro
make
make install
- Copy the starter file and give it execution permissions:
cp start-pgmodeler.sh pgmodeler.vars /opt/pgmodeler
chmod +x /opt/pgmodeler/start-pgmodeler.sh
- Give read and execution permissions to /opt:
chmod +rx /opt
-
Now, you should be able to open the tool as normal user:
IMPORTANT NOTE: replace NORMAL_USER with the relevant value
sudo NORMAL_USER -
/opt/pgmodeler/start-pgmodeler.sh
-
Configure to hide "table extended attributes" pgModeler:
Note: It is recommended to hide the "extended attributes" for a better view of the model. For doing this:
Edit -> Settings -> General -> Hide table extended attributes
-
Configure to show only primary key as foreign key when adding relationships pgModeler:
Note: default mode will add foreign key (primary key) + "_" + table name of the foreign key
Edit -> Settings -> Relationships -> FK Settings & Patterns -> One-to-one | One-to-many | Many-to-Many -> Column (Source) as {sc}
-
Load the specific datamodel (for example, eboa_data_model.dbm). For doing this (loading eboa_data_model.dbm):
File -> Load -> PATH_TO_EBOA/datamodel/eboa_data_model.dbm