<commit_before>class ResetSchemaForMroonga < ActiveRecord::Migration
  def change
    return unless Redmine::Database.mysql?
    reversible do |d|
      d.up do
        remove_index(:fts_projects, :name)
        remove_index(:fts_projects, :identifier)
        remove_index(:fts_projects, :description)
        remove_index(:fts_news, :title)
        remove_index(:fts_news, :summary)
        remove_index(:fts_news, :description)
        remove_index(:fts_issues, :subject)
        remove_index(:fts_issues, :description)
        remove_index(:fts_documents, :title)
        remove_index(:fts_documents, :description)
        remove_index(:fts_messages, :subject)
        remove_index(:fts_messages, :content)
        remove_index(:fts_attachments, :filename)
        remove_index(:fts_attachments, :description)
      end
      d.down do
        add_index(:fts_projects, :name, type: "fulltext")
        add_index(:fts_projects, :identifier, type: "fulltext")
        add_index(:fts_projects, :description, type: "fulltext")
        add_index(:fts_news, :title, type: "fulltext")
        add_index(:fts_news, :summary, type: "fulltext")
        add_index(:fts_news, :description, type: "fulltext")
        add_index(:fts_issues, :subject, type: "fulltext")
        add_index(:fts_issues, :description, type: "fulltext")
        add_index(:fts_documents, :title, type: "fulltext")
        add_index(:fts_documents, :description, type: "fulltext")
        add_index(:fts_messages, :subject, type: "fulltext")
        add_index(:fts_messages, :content, type: "fulltext")
        add_index(:fts_attachments, :filename, type: "fulltext")
        add_index(:fts_attachments, :description, type: "fulltext")
      end
    end
  end
end<commit_msg>Remove fts_* tables<commit_after>class ResetSchemaForMroonga < ActiveRecord::Migration
  def change
    return unless Redmine::Database.mysql?
    drop_table(:fts_projects, if_exists: true)
    drop_table(:fts_news, if_exists: true)
    drop_table(:fts_issues, if_exists: true)
    drop_table(:fts_journals, if_exists: true)
    drop_table(:fts_documents, if_exists: true)
    drop_table(:fts_messages, if_exists: true)
    drop_table(:fts_attachments, if_exists: true)
    drop_table(:fts_changesets, if_exists: true)
    drop_table(:fts_wiki_pages, if_exists: true)
    drop_table(:fts_wiki_contents, if_exists: true)
    drop_table(:fts_custom_values, if_exists: true)
  end
end
{'fraction_non_alphanumeric': 0.11390837804374743, 'fraction_numerical': 0.0, 'mean_word_length': 4.157446808510638, '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': '5391140', 'n_tokens_mistral': 797, 'n_tokens_neox': 753, 'n_words': 148}