<commit_before>class AddImageFileFormatToAlchemyPictures < ActiveRecord::Migration[4.2]
  def up
    add_column :alchemy_pictures, :image_file_format, :string

    say_with_time "Storing file format of existing pictures" do
      Alchemy::Picture.all.each do |pic|
        begin
          format = pic.image_file.identify('-ping -format "%m"')
          pic.update_column('image_file_format', format.to_s.chomp.downcase)
        rescue Dragonfly::Job::Fetch::NotFound => e
          say(e.message, true)
        end
      end
      Alchemy::Picture.count
    end
  end

  def down
    remove_column :alchemy_pictures, :image_file_format
  end
end<commit_msg>Remove the image file storing from migration<commit_after>class AddImageFileFormatToAlchemyPictures < ActiveRecord::Migration[4.2]
  def up
    add_column :alchemy_pictures, :image_file_format, :string
  end

  def down
    remove_column :alchemy_pictures, :image_file_format
  end
end
{'fraction_non_alphanumeric': 0.08271474019088017, 'fraction_numerical': 0.0042417815482502655, 'mean_word_length': 3.7437185929648242, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, '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': '3229268', 'n_tokens_mistral': 314, 'n_tokens_neox': 296, 'n_words': 66}