<commit_before>class AddSlugIndexToRepositories < ActiveRecord::Migration
  self.disable_ddl_transaction!

  def up
    execute "CREATE INDEX CONCURRENTLY index_repositories_on_slug ON repositories((owner_name || '/' || name))"
  end

  def down
    execute "DROP INDEX IF EXISTS index_repositories_on_slug"
  end
end<commit_msg>migrations: switch slug index migration to using a GIN index<commit_after>class AddSlugIndexToRepositories < ActiveRecord::Migration
  self.disable_ddl_transaction!

  def up
    execute "CREATE EXTENSION IF NOT EXISTS pg_trgm"
    execute "CREATE INDEX CONCURRENTLY index_repositories_on_slug ON repositories USING gin((owner_name || '/' || name) gin_trgm_ops)"
  end

  def down
    execute "DROP INDEX IF EXISTS index_repositories_on_slug"
  end
end
{'fraction_non_alphanumeric': 0.06274007682458387, 'fraction_numerical': 0.0, 'mean_word_length': 5.306451612903226, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6125197', 'n_tokens_mistral': 260, 'n_tokens_neox': 246, 'n_words': 68}