From 58a8b093cc032a3617c09125efee38a9620b7c8f Mon Sep 17 00:00:00 2001 From: nzdev <834725+nzdev@users.noreply.github.com> Date: Fri, 14 Aug 2020 16:32:46 +1200 Subject: [PATCH] Support SQL Server 2012 syntax on SQL Server 2019 --- .../Persistence/SqlSyntax/SqlServerSyntaxProvider.cs | 5 ++++- src/Umbraco.Core/Persistence/UmbracoDatabaseFactory.cs | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Persistence/SqlSyntax/SqlServerSyntaxProvider.cs b/src/Umbraco.Core/Persistence/SqlSyntax/SqlServerSyntaxProvider.cs index bb50fa98a11d..b187ed043332 100644 --- a/src/Umbraco.Core/Persistence/SqlSyntax/SqlServerSyntaxProvider.cs +++ b/src/Umbraco.Core/Persistence/SqlSyntax/SqlServerSyntaxProvider.cs @@ -30,6 +30,7 @@ internal enum VersionName V2014 = 6, V2016 = 7, V2017 = 8, + V2019 = 9, Other = 99 } @@ -38,7 +39,7 @@ internal enum EngineEdition Unknown = 0, Desktop = 1, Standard = 2, - Enterprise = 3, + Enterprise = 3,// Also developer edition Express = 4, Azure = 5 } @@ -79,6 +80,8 @@ private static VersionName MapProductVersion(string productVersion) { case "??": return VersionName.Invalid; + case "15": + return VersionName.V2019; case "14": return VersionName.V2017; case "13": diff --git a/src/Umbraco.Core/Persistence/UmbracoDatabaseFactory.cs b/src/Umbraco.Core/Persistence/UmbracoDatabaseFactory.cs index c502abc87cd4..baab8c486e01 100644 --- a/src/Umbraco.Core/Persistence/UmbracoDatabaseFactory.cs +++ b/src/Umbraco.Core/Persistence/UmbracoDatabaseFactory.cs @@ -156,6 +156,7 @@ private void UpdateSqlServerDatabaseType() case SqlServerSyntaxProvider.VersionName.V2014: case SqlServerSyntaxProvider.VersionName.V2016: case SqlServerSyntaxProvider.VersionName.V2017: + case SqlServerSyntaxProvider.VersionName.V2019: _databaseType = DatabaseType.SqlServer2012; break; // else leave unchanged