docs: def remove_uuid_id_like_indexes(app_name, database=None):
      """
      Remove all of varchar_pattern_ops indexes that django created for uuid
      columns.
      A search is never done with a filter of the style (uuid__like='1ae3c%'), so
      all such indexes can be removed from Versionable models.
      This will only try to remove indexes if they exist in the database, so it
      should be safe to run in a post_migrate signal handler.  Running it several
      times should leave the database in the same state as running it once.
      :param str app_name: application name whose Versionable models will be
          acted on.
      :param str database: database alias to use.  If None, use default
          connection.
      :return: number of indexes removed
      :rtype: int
      """
  
      removed_indexes = 0
      with database_connection(database).cursor() as cursor:
          for model in versionable_models(app_name, include_auto_created=True):
              indexes = select_uuid_like_indexes_on_table(model, cursor)
              if indexes:
                  index_list = ','.join(['"%s"' % r[0] for r in indexes])
                  cursor.execute("DROP INDEX %s" % index_list)
                  removed_indexes += len(indexes)
  
      return removed_indexes