In association with heise online

11 November 2008, 09:20

DB2 driver for Ruby goes to 1.0

  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

rubyforge has version 1.0 of the DB2 adapter for Ruby on Rails, also known as the ibm_db gem, available to download. The new version offers SSL encrypted connections and supports the setting and deleting of IS NULL constraints as well as the use of abbreviated data types for char, double and xml in "sexy migrations".

Migrations enable Ruby on Rails programmers to evolve their database structure as they develop applications by creating a migrations file which specifies, among other things, what columns are added or removed to tables. Ruby On Rails then takes these specification statements and generates the appropriate database commands to apply those changes to the actual database. Migrations act as a form of version control and can be applied to test,development or production systems allowing them to be kept up current more easily. "Sexy Migrations" are a new concise style of specifying the migration files, which appeared in Rails 2.0, which makes defining the database structure less error prone.

The IBM DB2 Rails driver also supports transactional migrations in the forthcoming Rails 2.2 which means that if a migration causes an exception to be raised, all the changes made up to that point will be reverted via rollback. The Rails developers also accepted a patch from IBM to Rails 2.2, which will allow a DB2 specific config/database.yml file to be generated via my_app -d ibm_db in this version. Apart from this package integrated into the rubygems repository there are also two further DB2 adapters for Ruby or Ruby on Rails, one by IBM's alphaworks site and another by the Ruby-DBI project.


Print Version | Send by email | Permalink:

  • July's Community Calendar

The H Open

The H Security

The H Developer

The H Internet Toolkit