I updated Umbraco from version 8 to 10 by following this tutorial.
The following error occurs when I execute the project.
There are no primary or candidate keys in the referenced table 'cmsContentType' that match the referencing column list in the foreign key 'FK_umbracoContentVersionCleanupPolicy_cmsContentType_nodeId'.\r\nCould not create constraint or index. See previous errors.\r\n at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)\r\n at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)\r\n at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)\r\n at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)\r\n at Microsoft.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean isAsync, Int32 timeout, Boolean asyncWrite)\r\n at Microsoft.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String methodName)\r\n at Microsoft.Data.SqlClient.SqlCommand.ExecuteNonQuery()\r\n at StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteNonQuery() in C:\\projects\\dotnet\\src\\MiniProfiler.Shared\\Data\\ProfiledDbCommand.cs:line 281\r\n at Umbraco.Cms.Infrastructure.Persistence.FaultHandling.FaultHandlingDbCommand.<ExecuteNonQuery>b__31_0()\r\n at Umbraco.Cms.Infrastructure.Persistence.FaultHandling.FaultHandlingDbCommand.<>c__DisplayClass33_0`1.<Execute>b__0()\r\n at Umbraco.Cms.Infrastructure.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)\r\n at Umbraco.Cms.Infrastructure.Persistence.FaultHandling.FaultHandlingDbCommand.Execute[T](Func`1 f)\r\n at Umbraco.Cms.Infrastructure.Persistence.FaultHandling.FaultHandlingDbCommand.ExecuteNonQuery()\r\n at NPoco.Database.<>c__DisplayClass296_0.<ExecuteNonQueryHelper>b__0()\r\n at NPoco.Database.ExecutionHook[T](Func`1 action)\r\n at NPoco.Database.ExecuteNonQueryHelper(DbCommand cmd)\r\n at NPoco.Database.Execute(String sql, CommandType commandType, Object[] args)\r\nError
I have tried this recommendation, but it didn't work. it shows
'Msg 3728, Level 16, State 1, Line 4 IX_umbracoNode_UniqueId' is not a constraint.
Msg 3727, Level 16, State 0, Line 4
Could not drop constraint. See previous errors.
After Above error we have updated the DB code on 9.1.1 version
drop table [dbo].[umbracoContentVersionCleanupPolicy]
GO
--drop table umbracoContentVersionCleanupPolicy
CREATE TABLE [dbo].[umbracoContentVersionCleanupPolicy](
[contentTypeId] [int] NOT NULL,
[preventCleanup] [bit] NOT NULL,
[keepAllVersionsNewerThanDays] [int] NULL,
[keepLatestVersionPerDayForDays] [int] NULL,
[updated] [datetime] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[umbracoContentVersionCleanupPolicy] WITH NOCHECK ADD CONSTRAINT [FK_umbracoContentVersionCleanupPolicy_cmsContentType_nodeId] CHECK (([contentTypeId]<>''))
GO
ALTER TABLE [dbo].[umbracoContentVersionCleanupPolicy] CHECK CONSTRAINT [FK_umbracoContentVersionCleanupPolicy_cmsContentType_nodeId]
GO
Issue Encountered During Upgrade from Umbraco 9.3.1 to 10.8.6
We recently encountered problems when upgrading our website from Umbraco 9.3.1 to Umbraco 10.8.6. This time, we faced a different issue than in previous upgrades, and I thought it might be helpful to share the details in case anyone else faces something similar.
DROP TABLE [dbo].[umbracoContentVersionCleanupPolicy];
CREATE TABLE [dbo].[newUmbracoContentVersionCleanupPolicy](
[contentTypeId] [int] NOT NULL,
[preventCleanup] [bit] NOT NULL,
[keepAllVersionsNewerThanDays] [int] NULL,
[keepLatestVersionPerDayForDays] [int] NULL,
[updated] [datetime] NOT NULL
) ON [PRIMARY];
ALTER TABLE [dbo].[cmsContentType]
ADD CONSTRAINT UQ_cmsContentType_nodeId UNIQUE ([nodeId]);
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[umbracoContentVersionCleanupPolicy]') AND type = 'U')
BEGIN
CREATE TABLE [dbo].[umbracoContentVersionCleanupPolicy](
[contentTypeId] [int] NOT NULL,
[preventCleanup] [bit] NOT NULL,
[keepAllVersionsNewerThanDays] [int] NULL,
[keepLatestVersionPerDayForDays] [int] NULL,
[updated] [datetime] NOT NULL
) ON [PRIMARY];
ALTER TABLE [dbo].[umbracoContentVersionCleanupPolicy] WITH CHECK ADD CONSTRAINT [FK_umbracoContentVersionCleanupPolicy_cmsContentType_nodeId] FOREIGN KEY([contentTypeId])
REFERENCES [dbo].[cmsContentType] ([nodeId])
ON DELETE CASCADE;
ALTER TABLE [dbo].[umbracoContentVersionCleanupPolicy] CHECK CONSTRAINT [FK_umbracoContentVersionCleanupPolicy_cmsContentType_nodeId];
END
I am working on upgrading Umbraco 8 to 10 . And me also following the guidelines from this page "https://docs.umbraco.com/umbraco-cloud/product-upgrades/version-specific-upgrades/migrate-from-8-to-latest" .
Actually I am facing error during login , Any idea about this ?
Failed to Upgrade Umbraco 8 to 10
I updated Umbraco from version 8 to 10 by following this tutorial.
The following error occurs when I execute the project.
I have tried this recommendation, but it didn't work. it shows
Msg 3727, Level 16, State 0, Line 4 Could not drop constraint. See previous errors.
After Above error we have updated the DB code on 9.1.1 version
Then After upgrade to Umbraco 10 it start working
Issue Encountered During Upgrade from Umbraco 9.3.1 to 10.8.6
We recently encountered problems when upgrading our website from Umbraco 9.3.1 to Umbraco 10.8.6. This time, we faced a different issue than in previous upgrades, and I thought it might be helpful to share the details in case anyone else faces something similar.
Hi Sowndar ,
I am working on upgrading Umbraco 8 to 10 . And me also following the guidelines from this page "https://docs.umbraco.com/umbraco-cloud/product-upgrades/version-specific-upgrades/migrate-from-8-to-latest" .
Actually I am facing error during login , Any idea about this ?
Initial thoughts on where to look...
Once you run the code, it will redirect you to the page mentioned above.
Please check your username and password. The site will automatically update the backoffice and tables once you provide a valid username and password.
is working on a reply...