PostgreSQL
Requirements
A list of supported PostgreSQL Versions can be found here: System Requirements
Depending on whether a new HAKOM database is to be created or an existing one is to be updated, please refer to the sections below.
Path to install package
All neccessary scripts for PostgreSQL can be found under the following path: Database Scripts
\PostgreSQL
Linux Environments
PowerShell Core has to be installed according to the corresponding documentation for the Linux distribution currently in use: https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux
Configuration.ini
To use installation/update powershell scripts a valid configuration.ini must be provided. This file can be found in folder Database Scripts\PostgreSQL
. Use a text editor to configure the ServerConfiguration and DatabaseConfiguration sections.
The parameters under SchemaConfiguration should not be changed!
New Installation
This section describes how to set up a fresh HAKOM TSM database on an existing PostgreSQL instance.
Pre-deployment Configuration
The scripts to be imported can be found under the following path: Database Scripts\PostgreSQL.
_manual check scripts and _specific scripts are not required for a new installation of a PostgreSQL database.
Executing the Powershell Scripts
Windows
To set up the database via powershell scripts, ensure that the file "configuration.ini" is properly configured as described in the chapter "Configuration.ini"
- Place the installation package in a local folder.
- Open a Windows PowerShell
- Navigate to
Database Scripts\PostgreSQL
- Run the file install-latest.ps1
Linux
To set up the database via powershell scripts, ensure that the file "configuration.ini" is properly configured as described in the chapter "Configuration.ini"
- Place the installation package in a local folder.
- Open a command line interface
- Navigate to
Database Scripts\PostgreSQL
- Run the file install-latest.ps1
Update
This section describes how to upgrade an existing database which already has HAKOM components installed to a more recent version.
Preparation
In order to determine the HAKOM database version currently in use check the entries of the table DBVERSION. The interpretation of the entries is explained in the following example:
- Table DBVERSION:
ID | NAME | DESCRIPTION | CREATIONDATE | REVISION | PATCH | MAJOR | MINOR |
---|---|---|---|---|---|---|---|
1 | HAKOM Framework | - | 01.07.2021 | 6 | 0 | 3 | 8 |
- Interpretation:
Version HAKOM Framework 3.8.6.0
Manual Check Scripts
Before the update scripts are installed, it is important to check if manual check scripts have to be executed. You can find them under \Manual check scripts before upgrade
and if necessary, import them into pgAdmin and follow the instructions as described in the scripts.
Executing the Powershell Scripts
Windows
To update the database via powershell scripts, ensure that the file "configuration.ini" is properly configured as described in the chapter "Configuration.ini"
- Place the installation package in a local folder.
- Open a Windows PowerShell
- Navigate to the path of the next higher version than the current version
- Run each of the following scripts if they exist in the given folder:
- upgrade.ps1
- upgrade-Index.ps1
- Repeat steps 3 and 4 up to the desired version.
Linux
To update the database via powershell scripts, ensure that the file "configuration.ini" is properly configured as described in the chapter "Configuration.ini"
- Place the installation package in a local folder.
- Open a command line interface
- Navigate to the path of the next higher version than the current version
- Run each of the following scripts if they exist in the given folder:
- upgrade.ps1
- upgrade-Index.ps1
- Repeat steps 3 and 4 up to the desired version.