CIF update to Pega 7.21 fails with SQL error
Communications Industry Foundation (CIF) update from 7.18 to 7.21 fails with SQL error.
Import failed: Encountered an issue applying DDL: ALTER TABLE PEGADATA.COMMS_CUST_ACCOUNT_BILLING MODIFY "USAGE_CHARGES" NUMBER (22, 2): Database-General Problem executing SQL to update database schema 1440 72000 ORA-01440: column to be modified must be empty to decrease precision or scale
Steps to Reproduce
Update from CIF 7.18 to CIF 7.21.
Existing column is a NUMBER(22, 0). Changing this to NUMBER(22, 2) fails with an ORA-01440 error.
Attempting to increase the scale requires precision increase in accordance with the scale or, setting all values in the column to NULL.
ORA-01440: Column which requires modification must be empty to decrease precision or scale
Cause: An ALTER TABLE MODIFY statement attempted to decrease the scale or precision of a numeric column containing data. In order to decrease either of these values, the column must contain only NULL values. An attempt to increase the scale without increasing the precision will also cause this message.
Action: Set all values in the column to NULL before decreasing the numeric precision or scale. If attempting to increase the scale, increase the precision in accordance with the scale or set all values in the column to NULL first.
ResolutionPerform the following local-change:
Alter the table columns to be NUMBER(24,2) by using the below mentioned method, and continue with the update.
ALTER TABLE PEGADATA.COMMS_CUST_ACCOUNT_BILLING MODIFY "RECURRING_CHARGES" NUMBER (24, 2);
ALTER TABLE PEGADATA.COMMS_CUST_ACCOUNT_BILLING MODIFY "USAGE_CHARGES" NUMBER (24, 2);