I am trying to upgrade umbraco from 7.5.10 to 7.10.3 however when running the installer i get the following error:
The database failed to upgrade. ERROR: The database configuration failed with the following message: Violation of PRIMARY KEY constraint 'PKcmsMedia'. Cannot insert duplicate key in object 'dbo.cmsMedia'. The duplicate key value is (7bc53727-90b9-4244-a18f-07c661f3b220).
The statement has been terminated. Please check log file for additional information (can be found in '/AppData/Logs/UmbracoTraceLog.txt')
Right fixed. So I found the sql that the migration runs which was giving me error. I updated it and passed in the guid that was causing primary key error so my sql looks like
SELECT cmsPropertyData.dataNvarchar, cmsPropertyData.dataNtext, umbracoNode.id, cmsContentVersion.VersionId
FROM cmsPropertyData
INNER JOIN cmsPropertyType ON cmsPropertyType.id = cmsPropertyData.propertytypeid
INNER JOIN umbracoNode ON umbracoNode.id = cmsPropertyData.contentNodeId
INNER JOIN cmsContentVersion ON cmsContentVersion.ContentId = umbracoNode.id
WHERE cmsPropertyType.Alias = (@alias)
AND umbracoNode.id IN (SELECT umbracoNode.id
FROM umbracoNode
INNER JOIN cmsContent ON cmsContent.nodeId = umbracoNode.id
INNER JOIN cmsContentType ON cmsContentType.nodeId = cmsContent.contentType
INNER JOIN cmsPropertyType ON cmsPropertyType.contentTypeId = cmsContentType.nodeId
WHERE cmsPropertyType.Alias = (@alias) AND umbracoNode.nodeObjectType = (@nodeObjectType))
AND (cmsPropertyData.dataNvarchar IS NOT NULL OR cmsPropertyData.dataNtext IS NOT NULL)
AND cmsContentVersion.VersionId='6ff5d8cb-02ee-4cbf-8d1f-0d979eeb1e5e'
That gave me some duplicates. They should be unqiue. Anyhow did some digging in cmsPropertyData table and removed older duplicates and then re ran upgrader and it worked.
upgrade issue
Hello,
I am trying to upgrade umbraco from 7.5.10 to 7.10.3 however when running the installer i get the following error:
Anyone seen this before?
Regards
Ismail
I have manged to get up to 7.7.13 i cannot get up to next release 7.8.0 still keep getting this same error.
Anyone any ideas?
Regards
Ismail
Right fixed. So I found the sql that the migration runs which was giving me error. I updated it and passed in the guid that was causing primary key error so my sql looks like
SELECT cmsPropertyData.dataNvarchar, cmsPropertyData.dataNtext, umbracoNode.id, cmsContentVersion.VersionId FROM cmsPropertyData INNER JOIN cmsPropertyType ON cmsPropertyType.id = cmsPropertyData.propertytypeid INNER JOIN umbracoNode ON umbracoNode.id = cmsPropertyData.contentNodeId INNER JOIN cmsContentVersion ON cmsContentVersion.ContentId = umbracoNode.id WHERE cmsPropertyType.Alias = (@alias) AND umbracoNode.id IN (SELECT umbracoNode.id FROM umbracoNode INNER JOIN cmsContent ON cmsContent.nodeId = umbracoNode.id INNER JOIN cmsContentType ON cmsContentType.nodeId = cmsContent.contentType INNER JOIN cmsPropertyType ON cmsPropertyType.contentTypeId = cmsContentType.nodeId WHERE cmsPropertyType.Alias = (@alias) AND umbracoNode.nodeObjectType = (@nodeObjectType)) AND (cmsPropertyData.dataNvarchar IS NOT NULL OR cmsPropertyData.dataNtext IS NOT NULL) AND cmsContentVersion.VersionId='6ff5d8cb-02ee-4cbf-8d1f-0d979eeb1e5e'
That gave me some duplicates. They should be unqiue. Anyhow did some digging in cmsPropertyData table and removed older duplicates and then re ran upgrader and it worked.
Regards
Ismail
is working on a reply...