public DatabaseUpdateResponse AlterStep01()
{
DatabaseUpdateResponse res = new DatabaseUpdateResponse();
bool bTestResult = SQLUpdateNugget.EvalNuggetKey("AlterStep01");
if (bTestResult) {
res.LastException = ExecFileContents("Carrotware.CMS.DBUpdater.DataScripts.ALTER01.sql", false);
res.Response = "Update comment view";
res.RanUpdate = true;
SetDbSchemaVersion(DatabaseUpdate.DbVersion01);
return res;
} else {
// if the db version is off, check leading tidbit against current and immediate prior
DataInfo ver = GetDbSchemaVersion();
if (DatabaseUpdate.DbVersion00.Substring(0, 6) == ver.DataValue.Substring(0, 6)
|| "201510" == ver.DataValue.Substring(0, 6) || "201509" == ver.DataValue.Substring(0, 6) || "201508" == ver.DataValue.Substring(0, 6)
|| DatabaseUpdate.DbVersion01.Substring(0, 6) == ver.DataValue.Substring(0, 6)) {
SetDbSchemaVersion(DatabaseUpdate.DbVersion01);
}
}
res.Response = "Comment view update already applied";
return res;
}