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'
|
|
|
|
|
2008-08-18 23:38:58 -04:00
|
|
|
ActiveRecord::Base.logger = Logger.new("debug.log")
|
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'
|