Assemblies for 'CMS' have not been updated to work with current database version 8011

Vote:
 

I just created a brand new empty CMS 12 application and wired it up to an existing database which I had from CMS 11 project. I see error as

NotSupportedException: The assemblies for 'CMS' have not been updated to work with current database version 8011.0. Supported database version is '8007.0'. I updated the version in database to 8007 and then I start getting below mentioned error. What do I need to do correct this.

22:19:38 [Error] Initialize action failed for 'Initialize on class EPiServer.Data.DataInitialization, EPiServer.Data, Version=12.11.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'
System.Data.DataException: Failed to update database during execution of statement 'CREATE TYPE [dbo].[SavePropertyTableType] AS TABLE (
    [PropertyDefinitionID] INT              NULL,
    [ScopeName]            NVARCHAR (450)   NULL,
    [Number]               INT              NULL,
    [Boolean]              BIT              NULL,
    [Date]                 DATETIME         NULL,
    [FloatNumber]          FLOAT (53)       NULL,
    [ContentType]          INT              NULL,
    [String]               NVARCHAR (450)   NULL,
    [LinkGuid]             UNIQUEIDENTIFIER NULL,
    [ContentLink]          INT              NULL,
    [LongString]           NVARCHAR (MAX)   NULL);

#294545
Jan 12, 2023 3:27
Vote:
 

You cannot just change the version in the stored procedure manually, you need to keep the assemblies in sync with the database version. if you login here with your World credentals https://nuget.optimizely.com/compare-database/, you can see the compatible versions. The database should be updated automatically when you update the assemblies. 

Can you roll back the database and try again?

Database version 8011 should use EPiServer.Cms.Core 12.11.0.

#294548
Jan 12, 2023 8:44
Vote:
 

You should revert the change to the database version, and let Optimizely CMS handle the update.

I've described everything you need to know (I hope) here:
https://www.gulla.net/en/blog/optimizely-content-cloud-cms-and-updates-to-the-database-schema/

#294549
Jan 12, 2023 8:56
Vote:
 

I just updated our nuget packages to the latest EPiServer versions and encountered the same error:

EPiServer.Framework.Initialization.InitializationException: 'Initialize action failed for Initialize on class EPiServer.Data.DataInitialization, EPiServer.Data, Version=12.11.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'
SqlException: The type 'dbo.SavePropertyTableType' already exists, or you do not have permission to create it.
DataException: Failed to update database during execution of statement 'CREATE TYPE [dbo].[SavePropertyTableType] AS TABLE (...

I'm using Integrated Security for authentication when developing locally and got full access.




Looking at the table types in SSMS shows that the table already exists.

#294572
Jan 12, 2023 14:43
Vote:
 

I tried to keep my hands off manually updating the version and as mentioned by Tomas and Johan, I just used nuget to downgrade assemblies and found that episerver framework 12.9.3 with DB version 8009 seems to work so will stick to it for now.

#295002
Jan 19, 2023 20:20
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.