Upgrading the Senzing Repository Schema to v4

Warning

This article is for general guidance. Always test any updates and changes in a non-production system before implementing them in production! If you have a working Senzing system with data and insight you do not wish to lose, or are unsure of any steps please contact Senzing Support. Support is 100% FREE!

When upgrading from Senzing v3 to Senzing v4, there are changes made to the entity repository database schema. The database(s) used by Senzing must be updated accordingly.

Database Upgrade SQL Scripts

Upgrade scripts for the Senzing entity repository are provided as part of the SDK packages. They provide the SQL statements needed to upgrade the database and are named with the database type and SDK version numbers, for example:

szcore-schema-postgresql-upgrade-3.0-to-4.0.sql

Each SQL script file contains the SQL statements needed to update the database from one major version to the next, for a specific database vendor. The following are example statements previously included in an upgrade script:

Generating Complete Scripts with sz_dbupgrade

The sz_dbupgrade utility, available in <project_path>/bin, is used to compute full database update scripts; even when crossing several versions or using multiple database types.

Example syntax:

sz_dbupgrade -c <INI file> -o <outputDirectory>

Example syntax with example parameters:

sz_dbupgrade -c ~/senzing/etc/sz_engine_config.ini -o ~/outputDir

This command generates the SQL upgrade script file from the current datastore version to the current Senzing v4 engine version.

Precautions

sz_dbupgrade is capable of performing the database updates itself with the -a argument and omitting the -o argument. However, this action is not recommended in production. We advise creating and reviewing the scripts with your DBA to gauge the specific operational impact any changes might have.

Info

If you have any questions, contact Senzing Support. Support is 100% FREE!