class AddServerDigest < ActiveRecord::Migration[4.2]  

  def change  
   
    # string_length = 10
    # rand(36**string_length).to_s(36) # generates random strings of lowercase a-z and 0-9    
         
    add_column :projects, :server_digest, :string 
    add_index :projects, :server_digest

    add_column :builds, :server_digest, :string 
    add_index :builds, :server_digest

    add_column :test_files, :server_digest, :string 
    add_index :test_files, :server_digest
    
    add_column :test_cases, :server_digest, :string 
    add_index :test_cases, :server_digest

    add_column :users, :server_digest, :string 
    add_index :users, :server_digest

    add_column :user_stories, :server_digest, :string 
    add_index :user_stories, :server_digest
    
    add_column :load_test_results, :server_digest, :string 
    add_index :load_test_results, :server_digest
    
  end
end