<commit_before>class AddNameTranslationToCategory < ActiveRecord::Migration
  class Category < ActiveRecord::Base
    attr_accessor :old_name
    translates :name
  end
  def up
    ActiveRecord::Base.connection.execute("CREATE EXTENSION IF NOT EXISTS hstore;")
    add_column :categories, :name_translations, :hstore
    ActiveRecord::Base.connection.execute("UPDATE categories SET name_translations = hstore('es', name);")
    remove_column :categories, :name
  end
end<commit_msg>fix to be able to run migration in heroku<commit_after>class AddNameTranslationToCategory < ActiveRecord::Migration
  def up
    ActiveRecord::Base.connection.execute("CREATE EXTENSION IF NOT EXISTS hstore;")
    add_column :categories, :name_translations, :hstore
    ActiveRecord::Base.connection.execute("UPDATE categories SET name_translations = hstore('es', name);")
    remove_column :categories, :name
  end
end
{'fraction_non_alphanumeric': 0.08990011098779134, 'fraction_numerical': 0.0, 'mean_word_length': 5.833333333333333, 'pattern_counts': {'":': 0, '<': 6, '<?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': '6438476', 'n_tokens_mistral': 252, 'n_tokens_neox': 251, 'n_words': 67}