code: def _cmd_down(self):
          
          revision = self._get_revision()
          if not self._rev:
              self._log(0, "downgrading current revision")
          else:
              self._log(0, "downgrading to revision %s" % revision)
          # execute from latest to oldest revision
          for rev in reversed(self._revisions[int(revision) - 1:]):
              sql_files = glob.glob(os.path.join(self._migration_path, rev, "*.down.sql"))
              sql_files.sort(reverse=True)
              self._exec(sql_files, rev)
          self._log(0, "done: downgraded revision to %s" % rev)
docs: Downgrade to a revision