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 54 posts 148 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 54 posts 148 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

  • Sowndar M 54 posts 148 karma points
    Aug 28, 2024 @ 11:56
    Sowndar M
    0

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

    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
    
  • Thamodaran 6 posts 86 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 82 posts 368 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 54 posts 148 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