code: def upgrade(self, conn, skip_versions=()):
          '''
          Upgrade the database from the current version to the maximum
          version in the upgrade scripts.
  
          :param conn: a DBAPI 2 connection
          :param skip_versions: the versions to skip
          '''
          db_versions = self.get_db_versions(conn)
          self.starting_version = max(db_versions)
          to_skip = sorted(db_versions | set(skip_versions))
          scripts = self.read_scripts(None, None, to_skip)
          if not scripts:  # no new scripts to apply
              return []
          self.ending_version = max(s['version'] for s in scripts)
          return self._upgrade(conn, scriptsf upgrade(self, conn, skip_versions=()):
          '''
          Upgrade the database from the current version to the maximum
          version in the upgrade scripts.
  
          :param conn: a DBAPI 2 connection
          :param skip_versions: the versions to skip
          '''
          db_versions = self.get_db_versions(conn)
          self.starting_version = max(db_versions)
          to_skip = sorted(db_versions | set(skip_versions))
          scripts = self.read_scripts(None, None, to_skip)
          if not scripts:  # no new scripts to apply
              return []
          self.ending_version = max(s['version'] for s in scripts)
          return self._upgrade(conn, scripts)
docs: Upgrade the database from the current version to the maximum
          version in the upgrade scripts.
  
          :param conn: a DBAPI 2 connection
          :param skip_versions: the versions to skip