<commit_before>class TidyUpBecauseOfBadException < ActiveRecord::Migration[4.2]
  def change
    if Hyrax::PermissionTemplate.column_names.include?('workflow_id')
      Hyrax::PermissionTemplate.all.each do |permission_template|
        workflow_id = permission_template.workflow_id
        next unless workflow_id
        Sipity::Workflow.find(workflow_id).update(active: true)<commit_msg>Use `column_exists?` to see if `:workflow_id` is present<commit_after>class TidyUpBecauseOfBadException < ActiveRecord::Migration[4.2]
  def change
    if column_exists?(Hyrax::PermissionTemplate.table_name, :workflow_id)
      Hyrax::PermissionTemplate.all.each do |permission_template|
        workflow_id = permission_template.workflow_id
        next unless workflow_id
        Sipity::Workflow.find(workflow_id).update(active: true)
{'fraction_non_alphanumeric': 0.09068923821039904, 'fraction_numerical': 0.0048367593712212815, 'mean_word_length': 5.2727272727272725, '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': '3520946', 'n_tokens_mistral': 251, 'n_tokens_neox': 246, 'n_words': 41}