Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sowndar M 50 posts 124 karma points
    Jan 09, 2023 @ 05:41
    Sowndar M
    0

    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.

    enter image description here

    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.

  • Sowndar M 50 posts 124 karma points
    Jan 12, 2023 @ 05:36
    Sowndar M
    0

    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
    

    Then After upgrade to Umbraco 10 it start working

  • Thamodaran 5 posts 85 karma points
    Mar 12, 2024 @ 07:08
    Thamodaran
    0

    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 ? enter image description here

  • Danine Noble 75 posts 330 karma points
    Mar 12, 2024 @ 16:23
    Danine Noble
    0

    Initial thoughts on where to look...

    1. Are there any errors in the logs to help pindown the issue?
    2. Have you checked all your user data is in the connected database?
  • Sowndar M 50 posts 124 karma points
    Mar 14, 2024 @ 12:59
    Sowndar M
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft