This article describes how to troubleshoot and resolve a database schema upgrade failure that may occur during a FortiSIEM upgrade from versions 7.1.x to 7.2.x. During the upgrade, the process may fail at the migrate-database stage with an error similar to the following:
[1;31m[11:54:41] migrate-database : DATABASE | Upgrade to new schema version script ...| localhost | FAILED | 32.54s[0m
<truncated>
ERROR: could not create unique index "ph_cust_property_device_property_cons"
DETAIL: Key (obj_id, property_def_id)=(1685056, 4212744350) is duplicated.
CONTEXT: SQL statement "ALTER TABLE ph_cust_property
ADD CONSTRAINT ph_cust_property_device_property_cons
UNIQUE (obj_id, property_def_id)"
This issue occurs when duplicate records exist in the ph_cust_property table, preventing the upgrade script from creating the required unique constraint.
|