We ran into a particular issue with our Oracle table definition (DDL) and in one of our PL/SQL scripts.
The issue is, there was a change in the table, changing from varchar(20)
to varchar(30)
, this change however, was not diligently reflected in one of our PL/SQL scripts consuming data, which was still varchar(20)
, causing a ORA-06502: PL/SQL: numeric or value error
error during one of our regression tests.
I would like to seek advise from Oracle and database experts here, whether you have encountered such scenarios in the past, whereby there were changes to table DDL, and were not reflected in the PL/SQL and how you deal with this gap.
I know one easy way would be some form of enforcement or paperwork, but would there happen be more beautiful or elegant solution, i.e. the way foreign keys work to avoid insert/update/delete anomaly?
With thanks!