]> git.openstreetmap.org Git - rails.git/blob - vendor/gems/composite_primary_keys-1.1.0/test/connections/native_mysql/connection.rb
Freezing composite primary key so that we can apply TomH's patch to it, and that...
[rails.git] / vendor / gems / composite_primary_keys-1.1.0 / test / connections / native_mysql / connection.rb
1 print "Using native MySQL\n"
2 require 'fileutils'
3 require 'logger'
4 require 'adapter_helper/mysql'
5
6 log_path = File.expand_path(File.join(File.dirname(__FILE__), %w[.. .. .. log]))
7 FileUtils.mkdir_p log_path
8 puts "Logging to #{log_path}/debug.log"
9 ActiveRecord::Base.logger = Logger.new("#{log_path}/debug.log")
10
11 # Adapter config setup in locals/database_connections.rb
12 connection_options = AdapterHelper::MySQL.load_connection_from_env
13 ActiveRecord::Base.establish_connection(connection_options)