public static ActionResult PatchDatabase(Session session, Dictionary <string, DatabasePatchInfo[]> featurePatchInfos) { try { return(DatabaseCustomAction.PatchDatabase(session, featurePatchInfos)); } catch (Exception ex) { session.ShowErrorMessage(ex); throw ex; } }
public static ActionResult PatchDatabase(Session session) { try { var patchInfos = new Dictionary <string, DatabasePatchInfo[]>(); patchInfos["PM"] = new DatabasePatchInfo[] { new DatabasePatchInfo(new Version(1, 2), Properties.Resources.patchbas_1_2, null), new DatabasePatchInfo(new Version(2, 0), Properties.Resources.patchbas_2_0, null) }; return(DatabaseCustomAction.PatchDatabase(session, patchInfos)); } catch (Exception ex) { session.ShowErrorMessage(ex); throw ex; } }
public static ActionResult PatchDatabase(Session session) { try { var patchInfos = new Dictionary <string, DatabasePatchInfo[]>(); patchInfos["CPR"] = new DatabasePatchInfo[] { new DatabasePatchInfo() { Version = new Version(1, 3), SqlScript = Properties.Resources.PatchDatabase_1_3, PatchAction = conn => CprBroker.Providers.CPRDirect.Authority.ImportText(Properties.Resources.Authority_4357, conn) }, new DatabasePatchInfo() { Version = new Version(1, 3, 2), SqlScript = Properties.Resources.PatchDatabase_1_3_2, PatchAction = null }, new DatabasePatchInfo() { Version = new Version(1, 4), SqlScript = Properties.Resources.PatchDatabase_1_4, PatchAction = null }, new DatabasePatchInfo() { Version = new Version(2, 1), SqlScript = Properties.Resources.PatchDatabase_2_1, PatchAction = null }, new DatabasePatchInfo() { Version = new Version(2, 2), SqlScript = Properties.Resources.PatchDatabase_2_2, PatchAction = null }, new DatabasePatchInfo() { Version = new Version(2, 2, 1), SqlScript = Properties.Resources.PatchDatabase_2_2_1, PatchAction = null }, new DatabasePatchInfo() { Version = new Version(2, 2, 2), SqlScript = Properties.Resources.PatchDatabase_2_2_2, PatchAction = conn => DatabaseCustomAction.InsertLookup(typeof(CprBroker.Data.DataProviders.BudgetInterval).Name, Properties.Resources.BudgetEntry, conn) }, }; patchInfos["EVENT"] = new DatabasePatchInfo[] { new DatabasePatchInfo() { Version = new Version(2, 2), SqlScript = CprBroker.Installers.EventBrokerInstallers.Properties.Resources.PatchDatabase_2_2, PatchAction = null } }; var result = DatabaseCustomAction.PatchDatabase(session, patchInfos); return(ActionResult.Success); } catch (Exception ex) { session.ShowErrorMessage(ex); throw ex; } }