Exemplo n.º 1
0
        public void CanFormatAChangeScriptList()
        {
            ChangeScript        change1 = new ChangeScript(1);
            ChangeScript        change3 = new ChangeScript(3);
            List <ChangeScript> list    = new List <ChangeScript>();

            list.Add(change1);
            list.Add(change3);

            Assert.AreEqual("1, 3", prettyPrinter.FormatChangeScriptList(list));
        }
Exemplo n.º 2
0
        public void ProcessDoChangeScripts(Int64 lastChangeToApply, List <Int64> appliedChanges)
        {
            if (lastChangeToApply != Int64.MaxValue)
            {
                Info("Only applying changes up and including change script #" + lastChangeToApply);
            }
            Info("Changes currently applied to database:\n  " + prettyPrinter.Format(appliedChanges));

            List <ChangeScript> doChangeScripts = changeScriptRepository.GetOrderedListOfDoChangeScripts();

            Info("Scripts available:\n  " + prettyPrinter.FormatChangeScriptList(doChangeScripts));

            changeScriptExecuter.ApplyDeltaFragmentHeaderOrFooterSql(schemaManager.GenerateVersionCheck());
            List <Int64> changesToApply = LoopThruDoScripts(lastChangeToApply, doChangeScripts, appliedChanges);

            Info("To be applied:\n  " + prettyPrinter.Format(changesToApply));
        }
Exemplo n.º 3
0
 private void LogStatus(ICollection <ChangeScript> scripts, ICollection <int> applied, ICollection <ChangeScript> toApply)
 {
     Info("Changes currently applied to database:\n  " + prettyPrinter.Format(applied));
     Info("Scripts available:\n  " + prettyPrinter.FormatChangeScriptList(scripts));
     Info("To be applied:\n  " + prettyPrinter.FormatChangeScriptList(toApply));
 }