<commit_before>class AddPositionToPhotos < ActiveRecord::Migration
  def change
    add_column :photos, :position, :integer
    Relic.all.each do |relic|
      relic.photos.order(:updated_at).each.with_index(1) do |photo, index|
        photo.update_column :position, index
      end
    end
  end
end<commit_msg>Mała poprawka przy ustawieniu sortowania obrazków<commit_after>class AddPositionToPhotos < ActiveRecord::Migration
  def up
    add_column :photos, :position, :integer
    Relic.find_each do |relic|
      relic.photos.order(:updated_at).each.with_index(1) do |photo, index|
        photo.update_column :position, index
      end
    end
  end

  def down
    remove_column :photos, :position
  end
end
{'fraction_non_alphanumeric': 0.08683473389355742, 'fraction_numerical': 0.0028011204481792717, 'mean_word_length': 3.7039473684210527, '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': '1784975', 'n_tokens_mistral': 235, 'n_tokens_neox': 231, 'n_words': 56}