Hi Adam,
Please refer the below Snotes regarding your upgrade error.
Links:
1201165 - Error: "BODI-20004: Error or warning in executing the SQL statement..." when upgrading Data Integrator repository running on Microsoft SQL Server
https://service.sap.com/sap/support/notes/1201165
1514501 - ERROR: An error occurred during creation of the local repository. (BODI-300054) – Data Services / Data Integrator
https://service.sap.com/sap/support/notes/1514501
1464215 - Getting BODI-300070 error when Upgrading Repository from 12.2.0.0 to 12.2.2.0 - Data Services
https://service.sap.com/sap/support/notes/1464215
This issue is already tracked (Track ID ADAPT00712275) before in BODI only can you check with the steps available in above Snotes.
Thanks,
Daya