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=22.214.171.124, 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);
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.
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/
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=126.96.36.199, 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.
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.