<commit_before>class FluxxGrantConvertAmountsToMoney < ActiveRecord::Migration
  def self.conversions
    {
      :budget_requests => %w[amount_requested amount_recommended],
      :funding_source_allocations => %w[amount],
      :funding_source_allocation_authorities => %w[amount],
      :funding_sources => %w[amount],
      :request_amendments => %w[amount_recommended],
      :request_funding_sources => %w[funding_amount],
      :request_transaction_funding_sources => %w[amount],
      :request_transactions => %w[amount_paid],
      :requests => %w[amount_requested amount_recommended funds_expended_amount],
    }
  end

  def self.up
    conversions.each { |table, fields|
      fields.each { |field| change_column table, field, :decimal, :scale => 2, :precision => 10 }
    }
  end

  def self.down
    conversions.each { |table, fields|
      fields.each { |field| change_colum table, field, :integer }
    }
  end
end
<commit_msg>fix migration<commit_after>class FluxxGrantConvertAmountsToMoney < ActiveRecord::Migration
  def self.conversions
    {
      :budget_requests => %w[amount_requested amount_recommended],
      :funding_source_allocations => %w[amount],
      :funding_source_allocation_authorities => %w[amount],
      :funding_sources => %w[amount],
      :request_amendments => %w[amount_recommended],
      :request_funding_sources => %w[funding_amount],
      :request_transaction_funding_sources => %w[amount],
      :request_transactions => %w[amount_paid amount_due],
      :requests => %w[amount_requested amount_recommended funds_expended_amount],
    }
  end

  def self.up
    conversions.each { |table, fields|
      fields.each { |field| change_column table, field, :decimal, :scale => 2, :precision => 10 }
    }
  end

  def self.down
    conversions.each { |table, fields|
      fields.each { |field| change_colum table, field, :integer }
    }
  end
end

{'fraction_non_alphanumeric': 0.11597258829731154, 'fraction_numerical': 0.0031628887717448603, 'mean_word_length': 3.9816272965879267, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, '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': '3956009', 'n_tokens_mistral': 625, 'n_tokens_neox': 602, 'n_words': 114}