From 50ed207211ab7ef998346c5ce7900a0882d0a149 Mon Sep 17 00:00:00 2001 From: Shannon Date: Fri, 23 Jan 2015 14:32:09 +1100 Subject: [PATCH] error check during stylesheet upgrade --- src/Umbraco.Core/ApplicationContext.cs | 2 +- .../MigrateStylesheetDataToFile.cs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Core/ApplicationContext.cs b/src/Umbraco.Core/ApplicationContext.cs index f42e4723fc..3634ae58ad 100644 --- a/src/Umbraco.Core/ApplicationContext.cs +++ b/src/Umbraco.Core/ApplicationContext.cs @@ -229,7 +229,7 @@ namespace Umbraco.Core if (currentVersion != configStatus) { - ProfilingLogger.Logger.Info("CurrentVersion different from configStatus: '" + currentVersion + "','" + configStatus + "'"); + ProfilingLogger.Logger.Debug("CurrentVersion different from configStatus: '" + currentVersion + "','" + configStatus + "'"); } diff --git a/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenThreeZero/MigrateStylesheetDataToFile.cs b/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenThreeZero/MigrateStylesheetDataToFile.cs index 1b169d8e68..05a5b54f5f 100644 --- a/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenThreeZero/MigrateStylesheetDataToFile.cs +++ b/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenThreeZero/MigrateStylesheetDataToFile.cs @@ -23,6 +23,10 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenThreeZe { public override void Up() { + //Don't exeucte if the stylesheet table is not there + var tables = SqlSyntax.GetTablesInSchema(Context.Database).ToArray(); + if (tables.InvariantContains("cmsStylesheet") == false) return; + //This is all rather nasty but it's how stylesheets used to work in the 2 various ugly ways so we just have to // deal with that to get this migration done