public static ProcessResults RecreateDBFromScratch(string id, TargetScripts targetScripts, Action <ProcessTrace, StepNotificationState> onNotificationStateChanged)
 {
     lock (_processSyncLock)
     {
         return(_dbVersionsAPI.RecreateDBFromScratch(id, targetScripts, onNotificationStateChanged));
     }
 }
        public override Command Create()
        {
            Command command = new Command("recreate")
            {
                _idOption,
            };

            command.Description = CLITextResources.RecreateCommandDescription;

            command.Handler = CommandHandler.Create <string>((id) =>
            {
                _consoleProcessMessages.StartProcessMessage("recreate", id);

                _consoleProcessMessages.StartSpiiner();
                ProcessResults processResults = _dbVersionsAPI.RecreateDBFromScratch(id, TargetScripts.CreateLastState(), _consoleProcessMessages.OnNotificationStateChanged);
                _consoleProcessMessages.StopSpinner();

                _consoleProcessMessages.ProcessComplete(processResults);
            });

            return(command);
        }