code: def reset(self, path, pretend=False):
          
          self._notes = []
  
          migrations = sorted(self._repository.get_ran(), reverse=True)
  
          count = len(migrations)
  
          if count == 0:
              self._note("<info>Nothing to rollback.</info>")
          else:
              for migration in migrations:
                  self._run_down(path, {"migration": migration}, pretend)
  
          return count
docs: Rolls all of the currently applied migrations back.
  
          :param path: The path
          :type path: str
  
          :param pretend: Whether we execute the migrations as dry-run
          :type pretend: bool
  
          :rtype: count