<commit_before># setup database
require 'active_record'
ActiveRecord::Base.logger = Logger.new(STDOUT)
ActiveRecord::Base.logger.level = Logger::ERROR

config = {
  :adapter  => RUBY_PLATFORM == "java" ? 'mysql' : 'mysql2',
  :database => 'property_sets_test',
  :username => 'root',
  :password => <PASSWORD>,
  :host     => '127.0.0.1',
  :port     => 3306
}

ActiveRecord::Base.establish_connection(config.merge(:database => nil))

# clear out everything
ActiveRecord::Base.connection.drop_database config[:database]
ActiveRecord::Base.connection.create_database config[:database], :charset => 'utf8', :collation => 'utf8_unicode_ci'

# connect and check
ActiveRecord::Base.establish_connection(config)
ActiveRecord::Base.connection.execute('select 1')

ActiveRecord::Migration.verbose = false

ActiveRecord::Schema.define(:version => 1) do
  create_table "account_settings", :force => true do |t|
    t.integer  "account_id"
    t.string   "name"
    t.string   "value"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index :account_settings, [ :account_id, :name ], :unique => true

  create_table "account_texts", :force => true do |t|
    t.integer  "account_id"
    t.string   "name"
    t.string   "value"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index :account_texts, [ :account_id, :name ], :unique => true

  create_table "account_validations", :force => true do |t|
    t.integer  "account_id"
    t.string   "name"
    t.string   "value"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index :account_validations, [ :account_id, :name ], :unique => true

  create_table "account_typed_data", :force => true do |t|
    t.integer  "account_id"
    t.string   "name"
    t.string   "value"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index :account_typed_data, [ :account_id, :name ], :unique => true

  create_table "account_benchmark_settings", :force => true do |t|
    t.integer  "account_id"
    t.string   "name"
    t.string   "value"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index :account_benchmark_settings, [ :account_id, :name ], :unique => true

  create_table "accounts", :force => true do |t|
    t.string   "name"
    t.datetime "created_at"
    t.datetime "updated_at"
  end
end
<commit_msg>Support reading MYSQL_URL so we can test in a VM<commit_after># setup database
require 'active_record'
ActiveRecord::Base.logger = Logger.new(STDOUT)
ActiveRecord::Base.logger.level = Logger::ERROR

mysql = URI(ENV['MYSQL_URL'] || 'mysql://root@127.0.0.1:3306')

config = {
  :adapter  => RUBY_PLATFORM == "java" ? 'mysql' : 'mysql2',
  :database => 'property_sets_test',
  :username => mysql.user,
  :password => <PASSWORD>,
  :host     => mysql.host,
  :port     => mysql.port
}

ActiveRecord::Base.establish_connection(config.merge(:database => nil))

# clear out everything
ActiveRecord::Base.connection.drop_database config[:database]
ActiveRecord::Base.connection.create_database config[:database], :charset => 'utf8', :collation => 'utf8_unicode_ci'

# connect and check
ActiveRecord::Base.establish_connection(config)
ActiveRecord::Base.connection.execute('select 1')

ActiveRecord::Migration.verbose = false

ActiveRecord::Schema.define(:version => 1) do
  create_table "account_settings", :force => true do |t|
    t.integer  "account_id"
    t.string   "name"
    t.string   "value"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index :account_settings, [ :account_id, :name ], :unique => true

  create_table "account_texts", :force => true do |t|
    t.integer  "account_id"
    t.string   "name"
    t.string   "value"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index :account_texts, [ :account_id, :name ], :unique => true

  create_table "account_validations", :force => true do |t|
    t.integer  "account_id"
    t.string   "name"
    t.string   "value"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index :account_validations, [ :account_id, :name ], :unique => true

  create_table "account_typed_data", :force => true do |t|
    t.integer  "account_id"
    t.string   "name"
    t.string   "value"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index :account_typed_data, [ :account_id, :name ], :unique => true

  create_table "account_benchmark_settings", :force => true do |t|
    t.integer  "account_id"
    t.string   "name"
    t.string   "value"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index :account_benchmark_settings, [ :account_id, :name ], :unique => true

  create_table "accounts", :force => true do |t|
    t.string   "name"
    t.datetime "created_at"
    t.datetime "updated_at"
  end
end

{'fraction_non_alphanumeric': 0.13585141903171954, 'fraction_numerical': 0.006260434056761269, 'mean_word_length': 3.9260020554984583, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '7427396', 'n_tokens_mistral': 1669, 'n_tokens_neox': 1627, 'n_words': 368}