<commit_before>module Migrator
  mattr_accessor :offer_migration_when_available
  @@offer_migration_when_available = true
  
  def self.migrations_path
    "#{RAILS_ROOT}/db/migrate"
  end

  def self.available_migrations
    Dir["#{migrations_path}/[0-9]*_*.rb"].sort
  end

  def self.current_schema_version
    ActiveRecord::Migrator.current_version rescue 0
  end

  def self.max_schema_version
    available_migrations.size
  end
  
  def self.db_supports_migrations?
    ActiveRecord::Base.connection.supports_migrations?
  end
  
  def self.migrate(version = nil)
    ActiveRecord::Migrator.migrate("#{migrations_path}/", version)    <commit_msg>Fix admin/ migration problem with 0_initial_schema, from Eridius<commit_after>module Migrator
  mattr_accessor :offer_migration_when_available
  @@offer_migration_when_available = true
  
  def self.migrations_path
    "#{RAILS_ROOT}/db/migrate"
  end

  def self.available_migrations
    Dir["#{migrations_path}/[1-9]*_*.rb"].sort_by { |name| name.scan(/\d+/).first.to_i }
  end

  def self.current_schema_version
    ActiveRecord::Migrator.current_version rescue 0
  end

  def self.max_schema_version
    available_migrations.size
  end
  
  def self.db_supports_migrations?
    ActiveRecord::Base.connection.supports_migrations?
  end
  
  def self.migrate(version = nil)
    ActiveRecord::Migrator.migrate("#{migrations_path}/", version)    
{'fraction_non_alphanumeric': 0.09649749821300929, 'fraction_numerical': 0.005003573981415297, 'mean_word_length': 4.490196078431373, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3548997', 'n_tokens_mistral': 490, 'n_tokens_neox': 497, 'n_words': 75}