Copied to clipboard

Flag this post as spam?

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


  • Tom 713 posts 954 karma points
    Jun 29, 2015 @ 04:00
    Tom
    0

    Cannot upgrade db from 6.2.4 -> 7.2.6

    Hi All, Try as I might there is currently no way I've found to upgrade my db using the umbraco installer.

    It errors out with:

    2015-06-29 13:56:55,278 [24] INFO Umbraco.Core.Persistence.Migrations.MigrationRunner - [T10/D3] Executing sql statement 79: ALTER TABLE [cmsTags] ADD CONSTRAINT [FKcmsTagscmsTags] FOREIGN KEY ([ParentId]) REFERENCES [cmsTags] ([id]) 2015-06-29 13:56:55,282 [24] INFO Umbraco.Core.Persistence.Migrations.MigrationRunner - [T10/D3] Executing sql statement 80: CREATE NONCLUSTERED INDEX [IXcmsTags] ON [cmsTags] ([tag],[group]) 2015-06-29 13:56:55,457 [24] INFO Umbraco.Core.Persistence.Migrations.MigrationRunner - [T10/D3] Executing sql statement 82: ALTER TABLE [umbracoUser] ALTER COLUMN [userPassword] NVARCHAR(500) NOT NULL 2015-06-29 13:56:55,695 [24] INFO Umbraco.Core.Persistence.Migrations.MigrationRunner - [T10/D3] Executing sql statement 85: ALTER TABLE [cmsDataTypePreValues] ALTER COLUMN [value] NTEXT NULL 2015-06-29 13:56:55,699 [24] INFO Umbraco.Core.Persistence.Migrations.MigrationRunner - [T10/D3] Executing sql statement 86: ALTER TABLE [cmsContent] ADD CONSTRAINT [FKcmsContentcmsContentTypenodeId] FOREIGN KEY ([contentType]) REFERENCES [cmsContentType] ([nodeId]) 2015-06-29 13:56:55,705 [24] INFO Umbraco.Core.Persistence.Migrations.MigrationRunner - [T10/D3] Executing sql statement 87: ALTER TABLE [cmsDocument] DROP COLUMN [alias] 2015-06-29 13:56:55,707 [24] INFO Umbraco.Core.Persistence.Migrations.MigrationRunner - [T10/D3] Executing sql statement 88: CREATE NONCLUSTERED INDEX [IXumbracoNodeUniqueID] ON [umbracoNode] ([uniqueID]) 2015-06-29 13:56:55,861 [24] INFO Umbraco.Web.Strategies.Migrations.ClearMediaXmlCacheForDeletedItemsAfterUpgrade - [T10/D3] Cleared 170 items from the media xml cache that were trashed and not meant to be there 2015-06-29 13:56:58,911 [24] INFO Umbraco.Core.Persistence.UmbracoDatabase - [T10/D3] at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Delegate.DynamicInvokeImpl(Object[] args) at Umbraco.Core.Persistence.Database.MultiPocoFactory.CallCallback[TRet](Delegate callback, IDataReader dr, Int32 count) at Umbraco.Core.Persistence.Database.<>cDisplayClass1a1.<CreateMultiPocoFactory>b__19(IDataReader reader, Delegate arg3) at Umbraco.Core.Persistence.Database.<Query>d__1c1.MoveNext() 2015-06-29 13:56:59,047 [24] ERROR Umbraco.Core.DatabaseContext - [T10/D3] Database configuration failed System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Unable to cast object of type 'System.Int32' to type 'System.String'. at System.Data.SqlClient.SqlBuffer.getString() at petapocofactory4(IDataReader ) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Delegate.DynamicInvokeImpl(Object[] args) at Umbraco.Core.Persistence.Database.MultiPocoFactory.CallCallback[TRet](Delegate callback, IDataReader dr, Int32 count) at Umbraco.Core.Persistence.Database.<>cDisplayClass1a1.<CreateMultiPocoFactory>b__19(IDataReader reader, Delegate arg3) at Umbraco.Core.Persistence.Database.<Query>d__1c1.MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at Umbraco.Core.Persistence.Repositories.UserRepository.PerformGet(Int32 id) at Umbraco.Core.Persistence.Repositories.RepositoryBase2.Get(TId id) at Umbraco.Core.Services.UserService.GetUserById(Int32 id) at Umbraco.Core.Services.UserService.GetProfileById(Int32 id) at Umbraco.Core.Services.EntityXmlSerializer.Serialize(IMediaService mediaService, IDataTypeService dataTypeService, IUserService userService, IMedia media, Boolean deep) at Umbraco.Core.Services.MediaService.

    The following columns were found in the database, but are not in the current schema: VersionInfo,Version,VersionInfo,AppliedOn,Vehicle,VehicleKey,Vehicle,MakeDescription,Vehicle,FamilyDescription,Vehicle,VehicleTypeCode,Vehicle,YearGroup,Vehicle,MonthGroup,Vehicle,SequenceNum,Vehicle,Description,Vehicle,CurrentRelease,Vehicle,ImportFlag,Vehicle,LimitedEdition,Vehicle,SeriesPublic,Vehicle,SeriesModelYear,Vehicle,BadgeDescription,Vehicle,BadgeSecondaryDescription,Vehicle,BodyStyleDescription,Vehicle,BodyConfigDescription,Vehicle,WheelBaseConfig,Vehicle,Roofline,Vehicle,ExtraIdentification,Vehicle,DriveDescription,Vehicle,GearTypeDescription,Vehicle,GearLocationDescription,Vehicle,GearNum,Vehicle,DoorNum,Vehicle,EngineSize,Vehicle,EngineDescription,Vehicle,Cylinders,Vehicle,FuelTypeDescription,Vehicle,InductionDescription,Vehicle,GrossCombinationMass,Vehicle,GrossVehicleMass,Vehicle,Height,Vehicle,Length,Vehicle,Width,Vehicle,KerbWeight,Vehicle,TareMass,umbracoUserGroup,id,umbracoUserGroup,userGroupName,umbracoStylesheetProperty,id,umbracoStylesheetProperty,stylesheetPropertyEditor,umbracoStylesheetProperty,stylesheet,umbracoStylesheetProperty,stylesheetPropertyAlias,umbracoStylesheetProperty,stylesheetPropertyName,umbracoStylesheetProperty,stylesheetPropertyValue,umbracoStylesheet,nodeId,umbracoStylesheet,filename,umbracoStylesheet,content,umbracoStatSession,id,umbracoStatSession,MemberId,umbracoStatSession,NewsletterId,umbracoStatSession,ReturningUser,umbracoStatSession,SessionStart,umbracoStatSession,SessionEnd,umbracoStatSession,Language,umbracoStatSession,UserAgent,umbracoStatSession,Browser,umbracoStatSession,BrowserVersion,umbracoStatSession,OperatingSystem,umbracoStatSession,Ip,umbracoStatSession,Referrer,umbracoStatSession,ReferrerKeyword,umbracoStatSession,allowCookies,umbracoStatSession,visitorId,umbracoStatSession,browserType,umbracoStatSession,isHuman,umbracoStatEntry,SessionId,umbracoStatEntry,EntryTime,umbracoStatEntry,RefNodeId,umbracoStatEntry,NodeId,cmsMacroPropertyType,id,cmsMacroPropertyType,macroPropertyTypeAlias,cmsMacroPropertyType,macroPropertyTypeRenderAssembly,cmsMacroPropertyType,macroPropertyTypeRenderType,cmsMacroPropertyType,macroPropertyTypeBaseType,Postcode,PK,Postcode,Code,Postcode,Suburb,Postcode,State,GroupBookingAgent,Code,GroupBookingAgent,Password,GroupBookingAgent,ProductCodes,GroupBookingAgent,IsRealTravelAgent,Caravan,VehicleKey,Caravan,MakeDescription,Caravan,FamilyDescription,Caravan,BodyStyle,Caravan,MakeYear,Caravan,Description,Caravan,FloorPlan,Caravan,KitchenDescription,Caravan,Berths,Caravan,ShowerToiletDescription,Caravan,LengthMetric,Caravan,WidthMetric,Caravan,LengthImperial,Caravan,WidthImperial,Caravan,Weight,Caravan,CountryOfOrigin,cmsMacroProperty,macroPropertyHidden,cmsMacroProperty,macroPropertyType,cmsDataType,controlId,umbracoUser,userDefaultPermissions,umbracoUser,defaultToLiveEditing,Product,PK,Product,BrochureCode,Product,ProductCode,Product,StillForSale,Product,ProductType,Product,ProductName,Product,FirstBookableSailingDate,Product,LastBookableSailingDate,Product,MinNumberOfPassengers,Product,MaxNumberOfPassengers,Product,MinNumberOfVehicles,Product,MaxNumberOfVehicles,Product,BlockedVehicleCategoryCodes,Product,BlockedAccommodationCategoryCodes,umbracoUser2userGroup,user,umbracoUser2userGroup,userGroup,cmsDocument,alias,PublishedPropertyValues,PropertyAlias,PublishedPropertyValues,PropertyName,PublishedPropertyValues,PropertyDescription,PublishedPropertyValues,Tab,PublishedPropertyValues,DocTypeAlias,PublishedPropertyValues,PublishedNodeId,PublishedPropertyValues,Url,PublishedPropertyValues,Value,UCUserSettings,User,UCUserSettings,Key,UCUserSettings,Value,Setting,Key,Setting,Value,cmsDataType,propertyEditorAlias,cmsMacroProperty,editorAlias,cmsTagRelationship,propertyTypeId

    The following constraints (Primary Keys, Foreign Keys and Indexes) were found in the database, but are not in the current schema: FKcmsMacroPropertycmsMacroPropertyTypeid,FKcmsTagRelationshipumbracoNodeid,FKuser2userGroupuser,FKuser2userGroupuserGroup,FKumbracoNodeumbracoNodeid,FKcmsContentcmsContentTypenodeId,FKcmsTagscmsTags,FKcmsTagRelationshipcmsContent,FKcmsTagRelationshipcmsPropertyType,PKCaravan,PKcmsMacroPropertyType,PKcmsPreviewXml,PKCode,PKPostcode,PKProduct,PKSetting,PKstylesheetProperty,PKUCUserSettings,PKumbracoStartSession,PKumbracoStatEntry,PKumbracoStylesheet,PKuser2userGroup,PKuserGroup,PKVehicle,PKcmsContentPreviewXml,IXumbracoNodeTrashed,IXumbracoNodeParentId,IXumbracoNodeUniqueID,IXumbracoNodeObjectType,IXcmsContentType,IXcmsContentTypeicon,IXcmsTemplatenodeId,IXcmsContent,IXcmsContentVersionContentId,IXcmsContentVersionVersionId,IXcmsDocument,IXcmsDocumentpublished,IXcmsDocumentnewest,IXcmsDataTypenodeId,IXcmsDictionaryid,IXumbracoLanguagelanguageISOCode,IXumbracoLog,IXcmsMacroPropertyAlias,IXcmsMacroPropertyAlias,IXcmsPropertyData,IXcmsPropertyData1,IXcmsPropertyData2,IXcmsPropertyData3,IXcmsTags,IXumbracoUserLoginsIndex,IXumbracoUseruserLogin,IXcmsTaskTypealias,IXcomputerName,IXumbracoServerisActive

    The following indexes were found in the database, but are not in the current schema: IXProductProductCode,UCVersion,IXumbracoNodeUniqueID,IXcmsMacroPropertyAlias,IXcmsMacroPropertyAlias,IXcmsTags

    2015-06-29 13:56:59,057 [24] ERROR Umbraco.Web.Install.Controllers.InstallApiController - [T10/D3] Installation step DatabaseUpgrade failed. 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: Exception has been thrown by the target of an invocation. Please check log file for additional information (can be found in '/App_Data/Logs/UmbracoTraceLog.txt') at Umbraco.Web.Install.InstallSteps.DatabaseUpgradeStep.Execute(Object model)

    I was thinking of using DB Ghost or schema compare but I am then wondering what I would be missing or stuffing up in the process.

    Just wondering if anyone has seen the same error and gotten around it?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jun 29, 2015 @ 07:00
    Jan Skovgaard
    0

    Hi Tom

    Upgrading can be straightforward and it can be really hard. It really depends how much custom stuff has been done to your installation and what kind of 3rd party packages and old datatype that you're using.

    So before going into any specific details about how to upgrade etc. I think it would help a lot if you could tell us some more detailed information about your installation like have you been doing any custom integrations? Are you using the Umbraco API's for anything that does custom stuff in the backoffice? Are you relying on 3rd party packages and what about datatypes? Any custom ones? Any 3rd party ones? What database are you using? Is it CE SQL, MSSQL, MySQL?

    And finally what approach have you been following during your upgrade? Have you been following the advice from the documentation? Or from a blogpost or?

    You might be able to get some ideas about an upgrade strategy and what to take into account by watching Heather Floyds session from Codegarden 2015 here btw http://stream.umbraco.org/video/11664126/making-the-leap-from-umbraco-v46-to-v7

    Looking forward to hearing from you.

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft