<commit_before>class ChangeArticleRefsPublicationDate < ActiveRecord::Migration
  def up
    change_table :article_refs do |t|
      t.change :publication_date, :integer
      t.rename :publication_date, :year
    end
  end

  def down
    # Nada
  end
end<commit_msg>Migration modificado para converter dados já cadas trados no banco.<commit_after>class ChangeArticleRefsPublicationDate < ActiveRecord::Migration
  def up
    add_column :article_refs, :year, :integer

    ArticleRef.reset_column_information

    article_refs = ArticleRef.all
    article_refs.each do |a|
      a.year = a.publication_date.year
      a.save
    end

    remove_column :article_refs, :publication_date
  end

  def down
    # Nada
  end
end
{'fraction_non_alphanumeric': 0.062154696132596686, 'fraction_numerical': 0.0, 'mean_word_length': 3.559748427672956, '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': '2652954', 'n_tokens_mistral': 238, 'n_tokens_neox': 228, 'n_words': 58}