We need to validate input. For this scenario (content upgrade) we should save the data, but make sure it does not crash. For texts longer than the DB schema allows, we should truncate it.
One node on h5p.org has an extremely long copyright field (IV specific one) filled with rubbish. That data is moved to the metadata part in IV’s content upgrade, and it ends in a DB error:
Data too long for column 'license_extras'