<commit_before>class CreateImpressionsTable < ActiveRecord::Migration
  def self.up
    create_table :impressions, :force => true do |t|
      t.string :impressionable_type
      t.integer :impressionable_id
      t.integer :user_id
      t.string :controller_name
      t.string :action_name
      t.string :view_name
      t.string :request_hash
      t.string :session_hash
      t.string :ip_address
      t.string :message
      t.string :referrer
      t.timestamps
    end
    add_index :impressions, [:impressionable_type, :impressionable_id, :request_hash], :name => "poly_request_index", :unique => false
    add_index :impressions, [:impressionable_type, :impressionable_id, :ip_address], :name => "poly_ip_index", :unique => false
    add_index :impressions, [:impressionable_type, :impressionable_id, :session_hash], :name => "poly_session_index", :unique => false    
    add_index :impressions, [:controller_name,:action_name,:request_hash], :name => "controlleraction_request_index", :unique => false
    add_index :impressions, [:controller_name,:action_name,:ip_address], :name => "controlleraction_ip_index", :unique => false
    add_index :impressions, [:controller_name,:action_name,:session_hash], :name => "controlleraction_session_index", :unique => false        
    add_index :impressions, :user_id
  end

  def self.down
    remove_index :impressions, :name => :poly_request_index
    remove_index :impressions, :name => :poly_ip_index
    remove_index :impressions, :name => :poly_session_index        
    remove_index :impressions, :name => :controlleraction_request_index
    remove_index :impressions, :name => :controlleraction_ip_index
    remove_index :impressions, :name => :controlleraction_session_index        
    remove_index :impressions, :user_id
    
    drop_table :impressions
  end
end<commit_msg>Use `text` columns rather than `string` in generated migration.<commit_after>class CreateImpressionsTable < ActiveRecord::Migration
  def self.up
    create_table :impressions, :force => true do |t|
      t.string :impressionable_type
      t.integer :impressionable_id
      t.integer :user_id
      t.string :controller_name
      t.string :action_name
      t.string :view_name
      t.string :request_hash
      t.string :ip_address
      t.text :session_hash
      t.text :message
      t.text :referrer
      t.timestamps
    end
    add_index :impressions, [:impressionable_type, :impressionable_id, :request_hash], :name => "poly_request_index", :unique => false
    add_index :impressions, [:impressionable_type, :impressionable_id, :ip_address], :name => "poly_ip_index", :unique => false
    add_index :impressions, [:impressionable_type, :impressionable_id, :session_hash], :name => "poly_session_index", :unique => false
    add_index :impressions, [:controller_name,:action_name,:request_hash], :name => "controlleraction_request_index", :unique => false
    add_index :impressions, [:controller_name,:action_name,:ip_address], :name => "controlleraction_ip_index", :unique => false
    add_index :impressions, [:controller_name,:action_name,:session_hash], :name => "controlleraction_session_index", :unique => false
    add_index :impressions, :user_id
  end

  def self.down
    remove_index :impressions, :name => :poly_request_index
    remove_index :impressions, :name => :poly_ip_index
    remove_index :impressions, :name => :poly_session_index
    remove_index :impressions, :name => :controlleraction_request_index
    remove_index :impressions, :name => :controlleraction_ip_index
    remove_index :impressions, :name => :controlleraction_session_index
    remove_index :impressions, :user_id

    drop_table :impressions
  end
end
{'fraction_non_alphanumeric': 0.10675675675675676, 'fraction_numerical': 0.0, 'mean_word_length': 4.71141975308642, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 41, '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': '4740515', 'n_tokens_mistral': 1174, 'n_tokens_neox': 1172, 'n_words': 247}