From 7495d89a7911d2fed257f87ee7179cd0ce73e6f0 Mon Sep 17 00:00:00 2001 From: Stephan Date: Wed, 26 Oct 2016 19:26:10 +0200 Subject: [PATCH] U4-9107 - enable bench on empty db --- src/Umbraco.Tests.Benchmarks/BulkInsertBenchmarks.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Tests.Benchmarks/BulkInsertBenchmarks.cs b/src/Umbraco.Tests.Benchmarks/BulkInsertBenchmarks.cs index 5212a4f524..05b14a528a 100644 --- a/src/Umbraco.Tests.Benchmarks/BulkInsertBenchmarks.cs +++ b/src/Umbraco.Tests.Benchmarks/BulkInsertBenchmarks.cs @@ -72,7 +72,8 @@ namespace Umbraco.Tests.Benchmarks logger); //drop the table - _dbSqlServer.Execute("DROP TABLE [umbracoServer]"); + // note: DROP TABLE IF EXISTS is SQL 2016+ + _dbSqlServer.Execute("IF OBJECT_ID('dbo.umbracoServer', 'U') IS NOT NULL DROP TABLE [umbracoServer]"); //re-create it _dbSqlServer.Execute(@"CREATE TABLE [umbracoServer](