<commit_before>class AddAdmin < ActiveRecord::Migration

  class Person < ActiveRecord::Base  
  end

  def self.up
    add_column :people, :admin, :boolean, :default => false, :null => false
    add_column :people, :deactivated, :boolean, 
                        :default => false, :null => false
    
    key = Crypto::Key.from_file("#{RAILS_ROOT}/rsa_key.pub")
    person = Person.new(:email => "<EMAIL>",
                        :name => "admin",
                        :crypted_password => key.encrypt("<PASSWORD>"),
                        :description => "")
    person.admin = true
    person.save!
  end

  def self.down
    remove_column :people, :deactivated
    Person.delete(Person.find_by_name("admin"))
    remove_column :people, :admin
  end
end<commit_msg>Fixed sample data load by adding blog creation in admin migration<commit_after>class AddAdmin < ActiveRecord::Migration

  class Person < ActiveRecord::Base  
  end
  
  class Blog < ActiveRecord::Base
  end

  def self.up
    add_column :people, :admin, :boolean, :default => false, :null => false
    add_column :people, :deactivated, :boolean, 
                        :default => false, :null => false
    
    key = Crypto::Key.from_file("#{RAILS_ROOT}/rsa_key.pub")
    person = Person.new(:email => "<EMAIL>",
                        :name => "admin",
                        :crypted_password => key.encrypt("<PASSWORD>"),
                        :description => "")
    person.admin = true
    person.save!
    Blog.create(:person_id => person.id)
  end

  def self.down
    remove_column :people, :deactivated
    Person.delete(Person.find_by_name("admin"))
    remove_column :people, :admin
  end
end
{'fraction_non_alphanumeric': 0.1269276393831554, 'fraction_numerical': 0.0, 'mean_word_length': 2.442857142857143, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 24, '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': '5688921', 'n_tokens_mistral': 503, 'n_tokens_neox': 484, 'n_words': 115}