Task 1515 in DB Migration for 905702a to 10.1.600

I had a related but slightly different error when upgrading from 10.1.400.18 to 10.1.600.4. Same script, but an error relating to primary keys. @Edge did the person who wrote that script have a bad day? :rofl:

Error Upgrade Process UpdateSchemaNameCols.sql Violation of PRIMARY KEY constraint ‘PK_ChgLog’. Cannot insert duplicate key in object ‘Ice.ChgLog’. The duplicate key value is (BVD, ACTRevision, Erp, ACTRevision, 10, 10~94, , 2015-11-13, 0, ).
UPDATE t1
SET [RelatedToSchemaName] = t2.TABLE_SCHEMA
FROM [Erp].[ARBalance] t1
INNER JOIN INFORMATION_SCHEMA.TABLES t2 ON t2.TABLE_NAME = t1.[RelatedToTable]
AND t2.TABLE_SCHEMA <> ‘dbo’
WHERE [RelatedToSchemaName] = ‘’