<commit_before>class ResetPriorityForOldProposalPollOptions < ActiveRecord::Migration[6.0]
  def change
    PollOption.joins(:poll).where('polls.poll_type': 'proposal', name: 'agree').update_all(priority: 0)
    PollOption.joins(:poll).where('polls.poll_type': 'proposal', name: 'abstain').update_all(priority: 1)
    PollOption.joins(:poll).where('polls.poll_type': 'proposal', name: 'disagree').update_all(priority: 2)
    PollOption.joins(:poll).where('polls.poll_type': 'proposal', name: 'block').update_all(priority: 3)
  end
end<commit_msg>dont upset other polls with the reset migration<commit_after>class ResetPriorityForOldProposalPollOptions < ActiveRecord::Migration[6.0]
  def change
    # PollOption.joins(:poll).where('polls.poll_type': 'proposal', name: 'agree', priority: 0).update_all(priority: 0)
    PollOption.joins(:poll).where('polls.poll_type': 'proposal', name: 'abstain', priority: 0).update_all(priority: 1)
    PollOption.joins(:poll).where('polls.poll_type': 'proposal', name: 'disagree', priority: 0).update_all(priority: 2)
    PollOption.joins(:poll).where('polls.poll_type': 'proposal', name: 'block', priority: 0).update_all(priority: 3)
  end
end
{'fraction_non_alphanumeric': 0.1652542372881356, 'fraction_numerical': 0.013559322033898305, 'mean_word_length': 7.144827586206897, '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': '1220975', 'n_tokens_mistral': 411, 'n_tokens_neox': 402, 'n_words': 68}