DB Update Issue (29.0.2 -> 30)

2025/01/08 2:32 PM

I am attempting to update an Xperience by Kentico project from 29.0 to 30 (or even 29.1 for that matter) and each time I am getting the same database update error.

Kentico.Web.Mvc.IStartupConfigureAction[0] Startup action 'Kentico.Web.Mvc.DbUpdateService'. System.Exception: [DataConnection.HandleError]:

  Query:
  IF NOT EXISTS (SELECT 1 FROM CMS_ScheduledTask WHERE TaskGUID = '99c68980-6627-4e05-8008-fd4a4377e56a')
  BEGIN
      INSERT [CMS_ScheduledTask] ([TaskName], [TaskDisplayName], [TaskAssemblyName], [TaskClass], [TaskInterval], [TaskData], [TaskLastRunTime], [TaskNextRunTime], [TaskLastResult], [TaskDeleteAfterLastRun], [TaskServerName], [TaskGUID], [TaskLastModified], [TaskExecutions], [TaskResourceID], [TaskRunInSeparateThread], [TaskLastExecutionReset], [TaskCondition], [TaskUserID], [TaskType], [TaskObjectType], [TaskObjectID], [TaskExecutingServerName], [TaskEnabled], [TaskIsRunning])
      VALUES ('Content.PublishScheduledContentItems', 'Publish scheduled content items', 'CMS.ContentEngine', 'CMS.ContentEngine.Internal.ScheduledContentItemPublisherTask', 'minute;3/11/2024 9:00:17 PM;1;00:00:00;00:00:00;Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday', '', getDate(), getDate(), 0, 0, NULL, '99c68980-6627-4e05-8008-fd4a4377e56a', getDate(), 0, NULL, 0, getDate(), NULL, NULL, NULL, NULL, NULL, '', 1, 0)
  END

  Caused exception:
  Invalid column name 'TaskResourceID'.
  Invalid column name 'TaskRunInSeparateThread'.
  Invalid column name 'TaskLastExecutionReset'.
  Invalid column name 'TaskCondition'.

   ---> Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid column name 'TaskResourceID'.
  Invalid column name 'TaskRunInSeparateThread'.
  Invalid column name 'TaskLastExecutionReset'.
  Invalid column name 'TaskCondition'.

Any help would be appreciated.

Answers

2025/01/08 2:43 PM

Did you run the database upgrade command line? If not then you will receive that error as there were new database tables and columns added.

2025/01/08 6:22 PM

Yes I did, that is what was output when running dotnet run -- --kxp-update --skip-confirmation.

2025/01/10 11:51 AM

What's the history of your database? Is it a fresh installed database while set up XbyK? Or was this updated somehow from any older version? Or have you done customizations in the database?

To answer this question, you have to login first.