Error occurs while upgrading Pega Sales Automation
Database constraint validation error occurs during an upgrade from Sales Automation 7.13 to Sales Automation 7.31.
Batch failure. The batch was submitted, but at least one exception occurred on an individual member of the batch.
com.ibm.db2.jcc.am.SqlIntegrityConstraintViolationException: Error for batch element #1: Assignment of a NULL value to a NOT NULL column "TBSPACEID=2, TABLEID=271, COLNO=20" is not allowed.. SQLCODE=-407, SQLSTATE=23502, DRIVER=4.18.60
Steps to Reproduce
Import Pega Sales Automation 7.31 to Pega 7.3.1 with Sales Automation 7.13.
The column referenced is a custom column which was added to the framework table. After the column populated, it was set to NOT NULL. Since the column is customized, the Upgrade does not specify a value for this column when new rows are inserted to the table. As a result, the error occurred.
Perform the following local-change:
- Set the column to allow NULL values
- Rerun the upgrade to insert new rows
- Run the routine to populate the custom column for new rows with column value as NULL
- Set the column to NOT NULL
0% found this useful