DB Migrating 7.14.0 -> 7.15.6 -> 8.1.0: Nullable objects must have value
Hello,
I am trying to migrate an older db version to a fresh install 8.1 umbraco, it has never been an issue before but this time it is bugging me.
I started out with umbraco 7.14, upgraded that to 7.15.6 without any issues, then i created a fresh 8.1 project and tried to upgrade the database and i got this issue:
The database failed to upgrade. ERROR: The database configuration failed with the following message: Nullable object must have a value. Please check log file for additional information (can be found in '/App_Data/Logs/')
Log:
{"@t":"2020-12-09T08:39:23.1069267Z","@mt":"SQL [{ContextIndex}]: {Sql}","ContextIndex":302,"Sql":"CREATE TABLE [umbracoContentSchedule] ([id] UniqueIdentifier NOT NULL,[nodeId] INTEGER NOT NULL,[languageId] INTEGER NULL,[date] DATETIME NOT NULL,[action] NVARCHAR(255) NOT NULL)","SourceContext":"Umbraco.Core.Migrations.Expressions.Execute.Expressions.ExecuteSqlStatementExpression","ProcessId":21812,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC3ROOT","MachineName":"DESKTOP-A8H0ROA","Log4NetLevel":"INFO ","HttpRequestNumber":6,"HttpRequestId":"c9725651-1da1-4222-b57b-e58039a124d1"}
{"@t":"2020-12-09T08:39:23.3985267Z","@mt":"Database configuration failed","@l":"Error","@x":"System.InvalidOperationException: Nullable object must have a value.\r\n at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)\r\n at Umbraco.Core.Migrations.Upgrade.V800.TablesForScheduledPublishing.Migrate() in d:\a\1\s\src\Umbraco.Core\Migrations\Upgrade\V800\TablesForScheduledPublishing.cs:line 17\r\n at Umbraco.Core.Migrations.MigrationBase.Umbraco.Core.Migrations.IMigration.Migrate() in d:\a\1\s\src\Umbraco.Core\Migrations\MigrationBase.cs:line 73\r\n at Umbraco.Core.Migrations.MigrationPlan.Execute(IScope scope, String fromState, IMigrationBuilder migrationBuilder, ILogger logger) in d:\a\1\s\src\Umbraco.Core\Migrations\MigrationPlan.cs:line 309\r\n at Umbraco.Core.Migrations.Upgrade.Upgrader.Execute(IScopeProvider scopeProvider, IMigrationBuilder migrationBuilder, IKeyValueService keyValueService, ILogger logger) in d:\a\1\s\src\Umbraco.Core\Migrations\Upgrade\Upgrader.cs:line 67\r\n at Umbraco.Core.Migrations.Install.DatabaseBuilder.UpgradeSchemaAndData(MigrationPlan plan) in d:\a\1\s\src\Umbraco.Core\Migrations\Install\DatabaseBuilder.cs:line 498","SourceContext":"Umbraco.Core.Migrations.Install.DatabaseBuilder","ProcessId":21812,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC3ROOT","MachineName":"DESKTOP-A8H0ROA","Log4NetLevel":"ERROR","HttpRequestNumber":6,"HttpRequestId":"c9725651-1da1-4222-b57b-e58039a124d1"}
{"@t":"2020-12-09T08:39:23.4035166Z","@mt":"The database schema validation produced the following summary: {DbSchemaSummary}","DbSchemaSummary":"The following tables were found in the database, but are not in the current schema:\r\nUFRecords,UFRecordFields,cmsPropertyData,UFRecordDataString,UFRecordDataLongString,UFRecordDataInteger,UFRecordDataBit,UFRecordDataDateTime,UFUserSecurity,UFUserFormSecurity,cmsTaskType,cmsTask,cmsContent,cmsContentVersion,cmsDocument,cmsMedia,cmsDataType,cmsDataTypePreValues,umbracoMigration,umbracoDomains,cmsContentXml,cmsPreviewXml,umbracoContent,umbracoContentVersion,umbracoMediaVersion,umbracoDocument,umbracoDataType,umbracoDomain,umbracoPropertyData,cmsContentNu,umbracoDocumentVersion,umbracoKeyValue,umbracoContentVersionCultureVariation,umbracoDocumentCultureVariation,umbracoContentSchedule\r\n \r\nThe following columns were found in the database, but are not in the current schema:\r\nUFRecords,Id,UFRecords,Form,UFRecords,Created,UFRecords,Updated,UFRecords,CurrentPage,UFRecords,UmbracoPageId,UFRecords,IP,UFRecords,MemberKey,UFRecords,UniqueId,UFRecords,State,UFRecords,RecordData,UFRecordFields,Key,UFRecordFields,FieldId,UFRecordFields,Record,UFRecordFields,Alias,UFRecordFields,DataType,cmsPropertyData,id,cmsPropertyData,contentNodeId,cmsPropertyData,versionId,cmsPropertyData,propertytypeid,cmsPropertyData,dataInt,cmsPropertyData,dataDecimal,cmsPropertyData,dataDate,cmsPropertyData,dataNvarchar,cmsPropertyData,dataNtext,UFRecordDataString,Id,UFRecordDataString,Key,UFRecordDataString,Value,UFRecordDataLongString,Id,UFRecordDataLongString,Key,UFRecordDataLongString,Value,UFRecordDataInteger,Id,UFRecordDataInteger,Key,UFRecordDataInteger,Value,UFRecordDataBit,Id,UFRecordDataBit,Key,UFRecordDataBit,Value,cmsTags,ParentId,UFRecordDataDateTime,Id,UFRecordDataDateTime,Key,UFRecordDataDateTime,Value,UFUserSecurity,User,UFUserSecurity,ManageDataSources,UFUserSecurity,ManagePreValueSources,UFUserSecurity,ManageWorkflows,UFUserSecurity,ManageForms,UFUserFormSecurity,Id,UFUserFormSecurity,User,UFUserFormSecurity,Form,UFUserFormSecurity,HasAccess,UFUserFormSecurity,AllowInEditor,UFUserFormSecurity,SecurityType,cmsTaskType,id,cmsTaskType,alias,cmsTask,closed,cmsTask,id,cmsTask,taskTypeId,cmsTask,nodeId,cmsTask,parentUserId,cmsTask,userId,cmsTask,DateTime,cmsTask,Comment,cmsTemplate,design,cmsContent,pk,cmsContent,nodeId,cmsContent,contentType,cmsContentVersion,id,cmsContentVersion,ContentId,cmsContentVersion,VersionId,cmsContentVersion,VersionDate,cmsDocument,nodeId,cmsDocument,published,cmsDocument,documentUser,cmsDocument,versionId,cmsDocument,text,cmsDocument,releaseDate,cmsDocument,expireDate,cmsDocument,updateDate,cmsDocument,templateId,cmsDocument,newest,cmsMedia,nodeId,cmsMedia,versionId,cmsMedia,mediaPath,cmsDataType,pk,cmsDataType,nodeId,cmsDataType,propertyEditorAlias,cmsDataType,dbType,cmsDataTypePreValues,id,cmsDataTypePreValues,datatypeNodeId,cmsDataTypePreValues,value,cmsDataTypePreValues,sortorder,cmsDataTypePreValues,alias,umbracoMigration,id,umbracoMigration,name,umbracoMigration,createDate,umbracoMigration,version,umbracoDomains,id,umbracoDomains,domainDefaultLanguage,umbracoDomains,domainRootStructureID,umbracoDomains,domainName,cmsMacro,macroScriptType,cmsMacro,macroScriptAssembly,cmsMacro,macroXSLT,cmsMacro,macroPython,cmsContentXml,nodeId,cmsContentXml,xml,cmsPreviewXml,nodeId,cmsPreviewXml,versionId,cmsPreviewXml,timestamp,cmsPreviewXml,xml,cmsContentType,isElement,cmsContentType,variations,umbracoContent,nodeId,umbracoContent,contentTypeId,umbracoContentVersion,id,umbracoContentVersion,nodeId,umbracoContentVersion,versionDate,umbracoContentVersion,userId,umbracoContentVersion,current,umbracoContentVersion,text,umbracoMediaVersion,id,umbracoMediaVersion,path,umbracoDocument,nodeId,umbracoDocument,published,umbracoDocument,edited,umbracoDataType,nodeId,umbracoDataType,propertyEditorAlias,umbracoDataType,dbType,umbracoDataType,config,umbracoLanguage,isDefaultVariantLang,umbracoLanguage,mandatory,umbracoLanguage,fallbackLanguageId,umbracoDomain,id,umbracoDomain,domainDefaultLanguage,umbracoDomain,domainRootStructureID,umbracoDomain,domainName,umbracoLog,entityType,umbracoLog,parameters,cmsMacro,macroSource,cmsMacro,macroType,cmsPropertyType,variations,umbracoPropertyData,id,umbracoPropertyData,versionId,umbracoPropertyData,propertyTypeId,umbracoPropertyData,languageId,umbracoPropertyData,segment,umbracoPropertyData,intValue,umbracoPropertyData,decimalValue,umbracoPropertyData,dateValue,umbracoPropertyData,varcharValue,umbracoPropertyData,textValue,cmsTags,languageId,umbracoRedirectUrl,culture,cmsContentNu,nodeId,cmsContentNu,published,cmsContentNu,data,cmsContentNu,rv,umbracoDocumentVersion,id,umbracoDocumentVersion,templateId,umbracoDocumentVersion,published,umbracoKeyValue,key,umbracoKeyValue,value,umbracoKeyValue,updated,umbracoContentVersionCultureVariation,id,umbracoContentVersionCultureVariation,versionId,umbracoContentVersionCultureVariation,languageId,umbracoContentVersionCultureVariation,name,umbracoContentVersionCultureVariation,date,umbracoContentVersionCultureVariation,availableUserId,umbracoDocumentCultureVariation,id,umbracoDocumentCultureVariation,nodeId,umbracoDocumentCultureVariation,languageId,umbracoDocumentCultureVariation,edited,umbracoDocumentCultureVariation,available,umbracoDocumentCultureVariation,published,umbracoDocumentCultureVariation,name,umbracoContentSchedule,id,umbracoContentSchedule,nodeId,umbracoContentSchedule,languageId,umbracoContentSchedule,date,umbracoContentSchedule,action\r\n \r\nThe following constraints (Primary Keys, Foreign Keys and Indexes) were found in the database, but are not in the current schema:\r\nFKcmsContentcmsContentTypenodeId,FKcmsContentumbracoNodeid,FKcmsContentVersioncmsContentnodeId,FKcmsContentXmlcmsContentnodeId,FKcmsDataTypeumbracoNodeid,FKcmsDataTypePreValuescmsDataTypenodeId,FKcmsDocumentcmsContentnodeId,FKcmsDocumentcmsTemplatenodeId,FKcmsDocumentumbracoNodeid,FKcmsMediacmsContentnodeId,FKcmsMediaumbracoNodeid,FKcmsMembercmsContentnodeId,FKcmsMemberumbracoNodeid,FKcmsPreviewXmlcmsContentnodeId,FKcmsPreviewXmlcmsContentVersionVersionId,FKcmsPropertyDatacmsPropertyTypeid,FKcmsPropertyDataumbracoNodeid,FKcmsPropertyTypecmsDataTypenodeId,FKcmsTagscmsTags,FKcmsTaskcmsTaskTypeid,FKcmsTaskumbracoNodeid,FKcmsTaskumbracoUser,FKcmsTaskumbracoUser1,FKUFRecordDataBitUFRecordFieldsKey,FKUFRecordDataDateTimeUFRecordFieldsKey,FKUFRecordDataIntegerUFRecordFieldsKey,FKUFRecordDataLongStringUFRecordFieldsKey,FKUFRecordDataStringUFRecordFieldsKey,FKumbracoDomainsumbracoNodeid,FKumbracoNodeumbracoUserid,FKumbracoContentumbracoNodeid,FKumbracoContentcmsContentTypeNodeId,FKumbracoContentVersionumbracoContentnodeId,FKumbracoContentVersionumbracoUserid,FKumbracoMediaVersionumbracoContentVersionid,FKumbracoDocumentumbracoContentnodeId,FKumbracoDataTypeumbracoNodeid,FKumbracoLanguageumbracoLanguageid,FKumbracoDomainumbracoNodeid,FKumbracoLogumbracoUserid,FKcmsMemberumbracoContentnodeId,FKcmsPropertyTypeumbracoDataTypenodeId,FKumbracoPropertyDataumbracoContentVersionid,FKumbracoPropertyDatacmsPropertyTypeid,FKumbracoPropertyDataumbracoLanguageid,FKcmsTagsumbracoLanguageid,FKcmsContentNuumbracoContentnodeId,FKumbracoDocumentVersionumbracoContentVersionid,FKumbracoDocumentVersioncmsTemplatenodeId,FKumbracoContentVersionCultureVariationumbracoContentVersionid,FKumbracoContentVersionCultureVariationumbracoLanguageid,FKumbracoContentVersionCultureVariationumbracoUserid,FKumbracoDocumentCultureVariationumbracoNodeid,FKumbracoDocumentCultureVariationumbracoLanguageid,FKumbracoContentScheduleumbracoContentnodeId,FKumbracoContentScheduleumbracoLanguageid,PKcmsContent,PKcmsContentPreviewXml,PKcmsContentVersion,PKcmsContentXml,PKcmsDataType,PKcmsDataTypePreValues,PKcmsDocument,PKcmsMedia,PKcmsPropertyData,PKcmsTask,PKcmsTaskType,PKstructure,PKUFRecordDataBit,PKUFRecordDataDateTime,PKUFRecordDataInteger,PKUFRecordDataLongString,PKUFRecordDataString,PKUFRecordFields,PKUFRecords,PKumbracoDomains,PKumbracoMigration,PKumbracoNode,PKumbracoContent,PKumbracoContentVersion,PKumbracoMediaVersion,PKumbracoDocument,PKumbracoDataType,PKumbracoDomain,PKumbracoPropertyData,PKcmsContentNu,PKumbracoDocumentVersion,PKumbracoKeyValue,PKumbracoContentVersionCultureVariation,PKumbracoDocumentCultureVariation,PKumbracoContentSchedule\r\n \r\nThe following indexes were found in the database, but are not in the current schema:\r\nIXcmsContent,IXcmsContentVersionContentId,IXcmsContentVersionVersionId,IXcmsDataTypenodeId,IXcmsDocument,IXcmsDocumentnewest,IXcmsDocumentpublished,IXcmsMedia,IXcmsPropertyData1,IXcmsPropertyData2,IXcmsPropertyData3,IXcmsTaskTypealias,IXdatabitrecordfield,IXdatadatetimerecordfield,IXdataintegerrecordfield,IXdatalongstringrecordfield,IXdatastringrecordfield,IXumbracoMigration,IXumbracoNodeObjectType,IXumbracoNodeParentId,IXumbracoNodePath,IXumbracoNodeTrashed,IXumbracoNodeUniqueID,IXumbracoNodeUniqueId,IXumbracoNodeParentId,IXumbracoNodePath,IXumbracoNodeTrashed,IXumbracoNodeObjectType,IXumbracoMediaVersion,IXumbracoDocumentPublished,IXumbracoLanguagefallbackLanguageId,IXumbracoPropertyDataVersionId,IXumbracoPropertyDataPropertyTypeId,IXumbracoPropertyDataLanguageId,IXumbracoPropertyDataSegment,IXcmsTagsLanguageId,IXumbracoUserLoginlastValidatedUtc,IXumbracoContentVersionCultureVariationVersionId,IXumbracoContentVersionCultureVariationLanguageId,IXumbracoDocumentCultureVariationNodeId,IXumbracoDocumentCultureVariationLanguageId\r\n \r\nThe following unknown constraints (Primary Keys, Foreign Keys and Indexes) were found in the database, but are not in the current schema:\r\nId\r\n \r\n","SourceContext":"Umbraco.Core.Migrations.Install.DatabaseBuilder","ProcessId":21812,"ProcessName":"iisexpress","ThreadId":9,"AppDomainId":2,"AppDomainAppId":"LMW3SVC3ROOT","MachineName":"DESKTOP-A8H0ROA","Log4NetLevel":"INFO ","HttpRequestNumber":6,"HttpRequestId":"c9725651-1da1-4222-b57b-e58039a124d1"}
{"@t":"2020-12-09T08:39:23.4911434Z","@mt":"Installation step {Step} failed.","@l":"Error","@x":"System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Umbraco.Web.Install.InstallException: The database failed to upgrade. ERROR: The database configuration failed with the following message: Nullable object must have a value.\n Please check log file for additional information (can be found in '/AppData/Logs/')\r\n at Umbraco.Web.Install.InstallSteps.DatabaseUpgradeStep.ExecuteAsync(Object model) in d:\a\1\s\src\Umbraco.Web\Install\InstallSteps\DatabaseUpgradeStep.cs:line 47\r\n --- End of inner exception stack trace ---\r\n at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)\r\n at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)\r\n at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)\r\n at Umbraco.Web.Install.Controllers.InstallApiController.Data/Logs/')\r\n at Umbraco.Web.Install.InstallSteps.DatabaseUpgradeStep.ExecuteAsync(Object model) in d:\a\1\s\src\Umbraco.Web\Install\InstallSteps\DatabaseUpgradeStep.cs:line 47\r\n --- End of inner exception stack trace ---\r\n at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)\r\n at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)\r\n at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)\r\n at Umbraco.Web.Install.Controllers.InstallApiController.
However, if i try to upgrade directly from 7.14.0 to 8.0.1 i get this error:
The database failed to upgrade. ERROR: The database configuration failed with the following message: Incorrect syntax near the keyword 'COLUMN'. Please check log file for additional information (can be found in '/App_Data/Logs/UmbracoTraceLog.txt')
DB Migrating 7.14.0 -> 7.15.6 -> 8.1.0: Nullable objects must have value
Hello,
I am trying to migrate an older db version to a fresh install 8.1 umbraco, it has never been an issue before but this time it is bugging me.
I started out with umbraco 7.14, upgraded that to 7.15.6 without any issues, then i created a fresh 8.1 project and tried to upgrade the database and i got this issue:
Log:
Any ideas?
However, if i try to upgrade directly from 7.14.0 to 8.0.1 i get this error:
Hi,
I am getting the same error -
The database failed to upgrade. ERROR: The database configuration failed with the following message: Nullable object must have a value.
Any suggestions to get rid of this, I ma trying to migrate from v7.15.10 to v8.1.0
Thanks
Hi,
Have you had a look at this answer by Marc Goodson? Looks the same as the issue you might be facing?
https://our.umbraco.com/forum/using-umbraco-and-getting-started/106070-systeminvalidoperationexception-nullable-object-must-have-a-value-in-the-umbraco-database-migration-from-715-to-8
is working on a reply...