2004-11-23 20:04:44 -05:00
|
|
|
print "Using native MySQL\n"
|
2008-01-18 02:30:42 -05:00
|
|
|
require_dependency 'models/course'
|
2004-11-23 20:04:44 -05:00
|
|
|
require 'logger'
|
|
|
|
|
2006-12-19 13:44:04 -05:00
|
|
|
RAILS_DEFAULT_LOGGER = Logger.new('debug.log')
|
|
|
|
RAILS_DEFAULT_LOGGER.level = Logger::DEBUG
|
|
|
|
ActiveRecord::Base.logger = RAILS_DEFAULT_LOGGER
|
2004-11-23 20:04:44 -05:00
|
|
|
|
2006-12-05 12:55:44 -05:00
|
|
|
# GRANT ALL PRIVILEGES ON activerecord_unittest.* to 'rails'@'localhost';
|
|
|
|
# GRANT ALL PRIVILEGES ON activerecord_unittest2.* to 'rails'@'localhost';
|
|
|
|
|
2006-07-10 15:27:04 -04:00
|
|
|
ActiveRecord::Base.configurations = {
|
|
|
|
'arunit' => {
|
|
|
|
:adapter => 'mysql',
|
|
|
|
:username => 'rails',
|
|
|
|
:encoding => 'utf8',
|
|
|
|
:database => 'activerecord_unittest',
|
|
|
|
},
|
|
|
|
'arunit2' => {
|
|
|
|
:adapter => 'mysql',
|
|
|
|
:username => 'rails',
|
|
|
|
:database => 'activerecord_unittest2'
|
|
|
|
}
|
|
|
|
}
|
2004-11-23 20:04:44 -05:00
|
|
|
|
2006-07-10 15:27:04 -04:00
|
|
|
ActiveRecord::Base.establish_connection 'arunit'
|
|
|
|
Course.establish_connection 'arunit2'
|