<commit_before>class AddEpisodeAttributes < ActiveRecord::Migration
  def change
    add_column :episodes, :url, :string
    add_column :episodes, :author_name, :string
    add_column :episodes, :author_email, :string
    add_column :episodes, :title, :text
    add_column :episodes, :subtitle, :text
    add_column :episodes, :content, :text
    add_column :episodes, :summary, :text
    add_column :episodes, :published, :datetime
    add_column :episodes, :updated, :datetime
    add_column :episodes, :image_url, :string
    add_column :episodes, :explicit, :string
    add_column :episodes, :keywords, :text
    add_column :episodes, :description, :text
    add_column :episodes, :categories, :text
    add_column :episodes, :block, :boolean
    add_column :episodes, :is_closed_captioned, :boolean
    add_column :episodes, :position, :integer
    add_column :episodes, :feedburner_orig_link, :string
    add_column :episodes, :feedburner_orig_enclosure_link, :string
    add_column :episodes, :is_perma_link, :boolean

    Episode.where(prx_uri: nil, title: nil).each { |e| EpisodeEntryHandler.new(e).update_from_overrides }
  end
end<commit_msg>Remember to save the episodes after updating from overrides<commit_after>class AddEpisodeAttributes < ActiveRecord::Migration
  def change
    add_column :episodes, :url, :string
    add_column :episodes, :author_name, :string
    add_column :episodes, :author_email, :string
    add_column :episodes, :title, :text
    add_column :episodes, :subtitle, :text
    add_column :episodes, :content, :text
    add_column :episodes, :summary, :text
    add_column :episodes, :published, :datetime
    add_column :episodes, :updated, :datetime
    add_column :episodes, :image_url, :string
    add_column :episodes, :explicit, :string
    add_column :episodes, :keywords, :text
    add_column :episodes, :description, :text
    add_column :episodes, :categories, :text
    add_column :episodes, :block, :boolean
    add_column :episodes, :is_closed_captioned, :boolean
    add_column :episodes, :position, :integer
    add_column :episodes, :feedburner_orig_link, :string
    add_column :episodes, :feedburner_orig_enclosure_link, :string
    add_column :episodes, :is_perma_link, :boolean

    Episode.where(prx_uri: nil, title: nil).each do |e|
      EpisodeEntryHandler.new(e).update_from_overrides
      puts "saving #{e.id}..."
      e.save!
    end
  end
end
{'fraction_non_alphanumeric': 0.104149377593361, 'fraction_numerical': 0.0, 'mean_word_length': 4.795673076923077, '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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6883147', 'n_tokens_mistral': 831, 'n_tokens_neox': 832, 'n_words': 199}