code: def get_db_versions(self, conn):
          
          curs = conn.cursor()
          query = 'select version from {}'.format(self.version_table)
          try:
              curs.execute(query)
              return set(version for version, in curs.fetchall())
          except:
              raise VersioningNotInstalled('Run oq engine --upgrade-db')
docs: Get all the versions stored in the database as a set.
  
          :param conn: a DB API 2 connection