//[TestMethod] public void CanCreateBaselineDatabase() { SettingsRepository repo = new SettingsRepository(); List<string> filesToRun = repo.GetSchemaChangeScripts(@"C:\Development\Nada\NadaNtd\Nada.UI\DatabaseScripts\Differentials\"); string result = repo.RunSchemaChangeScripts(filesToRun); Assert.IsTrue(result.Length == 0); }
private void RunUpdates() { SettingsRepository repo = new SettingsRepository(); string scriptsPath = Path.Combine( System.Windows.Forms.Application.StartupPath, @"DatabaseScripts\Differentials\"); List<string> scriptsToRun = repo.GetSchemaChangeScripts(scriptsPath); if (scriptsToRun.Count > 0) { WizardForm wiz = new WizardForm(new UpdateDb(scriptsToRun, DoRestart), Translations.Updates); wiz.OnFinish += () => { if (restartNeeded) OnRestart(); }; wiz.ShowDialog(); } }