<commit_before>class AddsTheListOrderIssuesAlreadyInTheDatabase < ActiveRecord::Migration
  def up
    issues = Issue.all
    issues[0].update_attributes(:predecessor_id => nil)
    for i in 1...issues.length
      issues[i].update_attributes(:predecessor_id => issues[i-1].id)
    end
  end

  def down
    Issue.all.each{|i| i.update_attributes(:predecessor_id => nil)}
  end
end
<commit_msg>makes the last migration aware of an empty db<commit_after>class AddsTheListOrderIssuesAlreadyInTheDatabase < ActiveRecord::Migration
  def up
    issues = Issue.all
    issues[0].update_attributes(:predecessor_id => nil) if issues[0]
    for i in 1...issues.length
      issues[i].update_attributes(:predecessor_id => issues[i-1].id)
    end
  end

  def down
    Issue.all.each{|i| i.update_attributes(:predecessor_id => nil)}
  end
end

{'fraction_non_alphanumeric': 0.10804321728691477, 'fraction_numerical': 0.008403361344537815, 'mean_word_length': 4.116564417177914, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '6819392', 'n_tokens_mistral': 279, 'n_tokens_neox': 271, 'n_words': 58}