<commit_before>class PopulateJobTaskResultType < ActiveRecord::Migration
  class JobTaskResult < ActiveRecord::Base; end

  def up
    JobTaskResult.find_each do |result|
      if result.name.start_with?('Run')
        result.type = 'RunWorkFlowTaskResult'
      else
        result.type = 'ImportSourceDataTaskResult'
      end
      result.save
    end
  end
end<commit_msg>Amend job task type populating migration to destroy jobs with no name<commit_after>class PopulateJobTaskResultType < ActiveRecord::Migration
  class JobTaskResult < ActiveRecord::Base; end

  def up
    JobTaskResult.find_each do |result|
      unless result.name
        result.destroy
        next
      end
      
      if result.name.start_with?('Run')
        result.type = 'RunWorkFlowTaskResult'
      else
        result.type = 'ImportSourceDataTaskResult'
      end
      result.save
    end
  end
end
{'fraction_non_alphanumeric': 0.06772009029345373, 'fraction_numerical': 0.0, 'mean_word_length': 2.856521739130435, 'pattern_counts': {'":': 0, '<': 7, '<?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': '4821047', 'n_tokens_mistral': 253, 'n_tokens_neox': 252, 'n_words': 63}