diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-01-01 19:22:16 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-01-01 19:22:16 +0000 |
commit | daf3e92a316c041b6b2bf331c8d2a51e710fe7bf (patch) | |
tree | ca492afaf76db59ec1ab99105c07b54ffb28cc6a /activerecord/test/connections/native_db2 | |
parent | a6fefad354d36f3e9a91f8582659ffcda1a35855 (diff) | |
download | rails-daf3e92a316c041b6b2bf331c8d2a51e710fe7bf.tar.gz rails-daf3e92a316c041b6b2bf331c8d2a51e710fe7bf.tar.bz2 rails-daf3e92a316c041b6b2bf331c8d2a51e710fe7bf.zip |
Added a db2 adapter that only depends on the Ruby/DB2 bindings (http://raa.ruby-lang.org/project/ruby-db2/) #386 [Maik Schmidt]. Converted all the fixtures to YAML style ones.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@303 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/connections/native_db2')
-rw-r--r-- | activerecord/test/connections/native_db2/connection.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/activerecord/test/connections/native_db2/connection.rb b/activerecord/test/connections/native_db2/connection.rb new file mode 100644 index 0000000000..47f323945a --- /dev/null +++ b/activerecord/test/connections/native_db2/connection.rb @@ -0,0 +1,24 @@ +print "Using native DB2\n" +require 'fixtures/course' +require 'logger' + +ActiveRecord::Base.logger = Logger.new("debug.log") + +db1 = 'arunit' +db2 = 'arunit2' + +ActiveRecord::Base.establish_connection( + :adapter => "db2", + :host => "localhost", + :username => "arunit", + :password => "arunit", + :database => db1 +) + +Course.establish_connection( + :adapter => "db2", + :host => "localhost", + :username => "arunit2", + :password => "arunit2", + :database => db2 +) |