<commit_before># THIS IS A DESCTRUCTIVE MIGRATION. PROFILES AND EXPERTISE ARE NOT PRESERVED
class MergeProfilesIntoPeople < ActiveRecord::Migration
  def self.up
         
    add_column :people, :first_name, :string
    add_column :people, :last_name, :string
    add_column :people, :email, :string
    add_column :people, :phone, :string
    add_column :people, :skype_name, :string
    add_column :people, :web_page, :string
    
           
    rename_table(:expertises_profiles, :expertises_people)
    rename_column(:expertises_people, :profile_id, :person_id)
            
    #all expertise is destroyed - there isn't currenlty any REAL data to be concerned about at this moment in time
    Expertise.delete_all  
    
    drop_table :profiles
   
  end

  def self.down
    
    create_table :profiles, :force => true do |t|
      t.string   :first_name
      t.string   :last_name
      t.string   :email
      t.string   :phone
      t.string   :skype_name
      t.string   :web_page
      t.integer  :person_id,  :limit => 11
    
      t.timestamps
    end
    
    Expertise.delete_all 
    rename_column(:expertises_people, :person_id, :profile_id)
    rename_table(:expertises_people, :expertises_profiles)
    
    
    remove_column :people, :first_name, :last_name, :email, :phone, :skype_name, :web_page
       
  end
end<commit_msg>fixed migrations to allow for loss of class Expertise<commit_after># THIS IS A DESCTRUCTIVE MIGRATION. PROFILES AND EXPERTISE ARE NOT PRESERVED
class MergeProfilesIntoPeople < ActiveRecord::Migration
  def self.up
         
    add_column :people, :first_name, :string
    add_column :people, :last_name, :string
    add_column :people, :email, :string
    add_column :people, :phone, :string
    add_column :people, :skype_name, :string
    add_column :people, :web_page, :string
    
           
    rename_table(:expertises_profiles, :expertises_people)
    rename_column(:expertises_people, :profile_id, :person_id)
            
    #all expertise is destroyed - there isn't currenlty any REAL data to be concerned about at this moment in time
    Expertise.delete_all if (Object.const_defined?("Expertise"))
    
    drop_table :profiles
   
  end

  def self.down
    
    create_table :profiles, :force => true do |t|
      t.string   :first_name
      t.string   :last_name
      t.string   :email
      t.string   :phone
      t.string   :skype_name
      t.string   :web_page
      t.integer  :person_id,  :limit => 11
    
      t.timestamps
    end
    
    Expertise.delete_all if (Object.const_defined?("Expertise"))
    rename_column(:expertises_people, :person_id, :profile_id)
    rename_table(:expertises_people, :expertises_profiles)
    
    
    remove_column :people, :first_name, :last_name, :email, :phone, :skype_name, :web_page
       
  end
end
{'fraction_non_alphanumeric': 0.08283185840707964, 'fraction_numerical': 0.001415929203539823, 'mean_word_length': 2.946927374301676, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '7245806', 'n_tokens_mistral': 961, 'n_tokens_neox': 947, 'n_words': 233}