Upgrade path from 2sxc v11.22.1 to v16 #3100
-
Hey all, I'm struggling to get a website on Evoq (v9.10.6) to upgrade 2sxc past v15. We are currently on 2sxc v11.22.1 and I've tried a few scenarios of upgrading the module that all get stuck with a SQL error at v15.00/15.02/15.03. I've read the release notes that recommend installing v15.02.00 (instead of 15.00) if you are on a version 14.00 or below, but it still runs into the error. The last few attempts I've tried have been doing multiple updates:
I've tried with and without v14.12.03 and still get stuck on v15.02.00. I've tried multiple attempts of v15.02.00. I've tried v15.03.00 as well with no luck. When running into the issue, the App module shows the latest version, but the Content module remains at the last version before the SQL error (v14.12.03) |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
So the version differences are because
Basically you should be able to just upgrade directly from anything after 9.x to the latest 15 or 16. Can you give any insights about the SQL which bombs? My guess is something was customized on the site, which changes the tables or something. |
Beta Was this translation helpful? Give feedback.
-
Here is the full install report (screen shot + text variation). This was when attempting to upgrade from v11.22.1 to v15.02.00. This appears to be the same error I am seeing when trying to do incremental upgrades, getting to 14.12.03 and trying to install v15.02.00. |
Beta Was this translation helpful? Give feedback.
-
It appears that SQL is failing on some line. What SQL are you using? Azure or "real"? what version? |
Beta Was this translation helpful? Give feedback.
-
In SQL Server 2014, there is no native syntax for You can modify SQL script in Here's your modified SQL script: SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- make sure sql rolls back automatically in case of error.
SET XACT_ABORT ON
GO
-- 1. remove sql trigger functionality that store data in 'ToSIC_EAV_DataTimeline' table
IF EXISTS (SELECT * FROM sys.triggers WHERE name = 'AutoLogAllChangesToTimeline_EntityRelationships')
DROP TRIGGER [dbo].[AutoLogAllChangesToTimeline_EntityRelationships];
IF EXISTS (SELECT * FROM sys.triggers WHERE name = 'AutoLogAllChangesToTimeline_Values')
DROP TRIGGER [dbo].[AutoLogAllChangesToTimeline_Values];
IF EXISTS (SELECT * FROM sys.triggers WHERE name = 'AutoLogAllChangesToTimeline_ValuesDimensions')
DROP TRIGGER [dbo].[AutoLogAllChangesToTimeline_ValuesDimensions];
IF EXISTS (SELECT * FROM sys.procedures WHERE name = 'ToSIC_EAV_LogToTimeline')
DROP PROCEDURE [dbo].[ToSIC_EAV_LogToTimeline]
GO
-- 2. first install case (execute when [ToSIC_EAV_DataTimeline] is empty)
IF NOT EXISTS (SELECT * FROM [dbo].[ToSIC_EAV_DataTimeline])
BEGIN
-- add CJson column to 'ToSIC_EAV_DataTimeline'
IF NOT EXISTS (SELECT * FROM sys.columns WHERE Name = 'CJson' AND Object_ID = OBJECT_ID('ToSIC_EAV_DataTimeline'))
BEGIN
ALTER TABLE [dbo].[ToSIC_EAV_DataTimeline] ADD [CJson] varbinary(max) NULL;
END
-- drop NewData column from 'ToSIC_EAV_DataTimeline'
IF EXISTS (SELECT * FROM sys.columns WHERE Name = 'NewData' AND Object_ID = OBJECT_ID('ToSIC_EAV_DataTimeline'))
BEGIN
ALTER TABLE [dbo].[ToSIC_EAV_DataTimeline] DROP COLUMN [NewData];
END
END
GO
-- 3. remove columns not in use
IF EXISTS (SELECT * FROM sys.columns WHERE Name = 'SortOrder' AND Object_ID = OBJECT_ID('ToSIC_EAV_AttributeGroups'))
ALTER TABLE [dbo].[ToSIC_EAV_AttributeGroups] DROP COLUMN [SortOrder];
IF EXISTS (SELECT * FROM sys.columns WHERE Name = 'SortOrder' AND Object_ID = OBJECT_ID('ToSIC_EAV_Entities'))
ALTER TABLE [dbo].[ToSIC_EAV_Entities] DROP COLUMN [SortOrder];
IF EXISTS (SELECT * FROM sys.columns WHERE Name = 'Description' AND Object_ID = OBJECT_ID('ToSIC_EAV_AttributeSets'))
ALTER TABLE [dbo].[ToSIC_EAV_AttributeSets] DROP COLUMN [Description];
GO This should work with SQL Server 2014. Please make sure you have a backup before running these commands as they permanently alter your database. |
Beta Was this translation helpful? Give feedback.
In SQL Server 2014, there is no native syntax for
DROP TRIGGER IF EXISTS
andDROP PROCEDURE IF EXISTS
, we need to first check if it exists and then drop it. The same goes forALTER TABLE ... DROP COLUMN IF EXISTS
, theIF EXISTS
clause is not supported.You can modify SQL script in
ToSic.Sxc.Dnn.16.01.00_Install.zip\SqlDataProvider\15.00.00.SqlDataProvider
file and use that modified ZIP in your upgrade process.Here's your modified SQL script: