Hi there, I’m trying to upgrade a project from 13.15.0 to 17.5.1 .
All the packages update and the project builds as exspected, but after the migration starts to run I’m hitting this error in the browser, with an Umbraco failed to boot message:
An error occurred while running the premigration upgrade.
The database configuration failed with the following message:
There are no primary or candidate keys in the referenced table
'umbracoNode' that match the referencing column list in the
foreign key 'FK_umbracoUserGroup2GranularPermission_umbracoNode_uniqueId'.
Could not create constraint or index. See previous errors.
Please check log file for additional information
(can be found in 'LoggingSettings.Directory')
I’ve tried running this query, but I think this is for constraints being untrusted rather than not being created (Untrusted Database Constraints | CMS 17.latest (LTS) | Umbraco Documentation):
OBJECT_NAME(fk.parent_object_id) AS TableName, fk.name AS ConstraintName
FROM sys.foreign_keys fk
INNER JOIN sys.schemas s ON fk.schema_id = s.schema_id
WHERE fk.is_not_trusted = 1
AND (OBJECT_NAME(fk.parent_object_id) LIKE 'umbraco%' OR OBJECT_NAME(fk.parent_object_id) LIKE 'cms%')
UNION ALL
SELECT 'Check constraint', s.name,
OBJECT_NAME(cc.parent_object_id), cc.name
FROM sys.check_constraints cc
INNER JOIN sys.schemas s ON cc.schema_id = s.schema_id
WHERE cc.is_not_trusted = 1
AND (OBJECT_NAME(cc.parent_object_id) LIKE 'umbraco%' OR OBJECT_NAME(cc.parent_object_id) LIKE 'cms%');
Has anyone come across this before?
Thanks