Added the ability to automate any c# scripts for an upgrade process. I realize this is superceded already in 6.0

but we need a way to do this in 4.x too especially for this release since we need to run a script to fix some db
issues. I've added a framework using an UpgradeScriptManager and another install step + unit tests for some of the
UpgradeScriptManager methods.
This commit is contained in:
Shannon Deminick
2013-01-31 04:26:37 +06:00
parent 97556de447
commit a5bea7fc59
22 changed files with 601 additions and 56 deletions

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Umbraco.Core.Configuration;
using umbraco.presentation.install;
using Umbraco.Web.Install.UpgradeScripts;
namespace Umbraco.Web.UI.Install.Steps
{
public partial class UpgradeScripts : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void RunScripts(object sender, EventArgs e)
{
//run the scripts and then go to the next step
UpgradeScriptManager.ExecuteScriptsForVersion(GlobalSettings.GetConfigurationVersion());
Helper.RedirectToNextStep(Page);
}
}
}

View File

@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Umbraco.Web.UI.Install.Steps {
public partial class UpgradeScripts {
/// <summary>
/// btnNext control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton btnNext;
}
}