<commit_before>class <%= migration_name %> < ActiveRecord::Migration
  def self.up
    create_table :localized_strings do |t|
      t.string :value
      t.string :locale
      t.integer :localized_model_id
      t.string :localized_model_type
      t.string :attribute

      t.timestamps
    end
  end

  def self.down
    drop_table :localized_strings
  end
end<commit_msg>Added index to database table, to improve performances.<commit_after>class <%= migration_name %> < ActiveRecord::Migration
  def self.up
    create_table :localized_strings do |t|
      t.string :value
      t.string :locale, :null => false
      t.integer :localized_model_id, :null => false
      t.string :localized_model_type, :null => false
      t.string :attribute, :null => false

      t.timestamps
    end
    
    add_index :localized_strings,
        [:locale, :localized_model_id, :localized_model_type, :attribute],
        :unique => true,
        :name => "eq_ref_index"
  end

  def self.down
    drop_table :localized_strings
  end
end
{'fraction_non_alphanumeric': 0.0923226433430515, 'fraction_numerical': 0.0, 'mean_word_length': 2.992248062015504, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, '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': '5997600', 'n_tokens_mistral': 332, 'n_tokens_neox': 322, 'n_words': 80}