Support for IBM DB2 database in Radiant

I would be interested in building a Radiant site with the IBM DB2 9.1
database as a back end.
Such product is available in a free express edition, and provides native
XML data storage, which would be very useful for our site, devoted to
XBRL, a language derived from XML used for representing financial
documents (http://xbrl.org).

I have installed the IBM_DB adapter version 0.4.6 and had it running.
The
adapter is still limited, since it does not support rename_column.
I was able to create the radiant bootstrap database substituting the
final
DB schema for the sequence of migrations.
I can create smippets and layouts, but cannot create pages. After
posting
the “create” command, I get an error message of the sort (translated
from
Italian):

Found unforeseen token “)” after “UPDATE pages SET (”. Token may be:
“<update_target_list>”. SQLSTATE=42601
SQLCODE=-104’

Before wasting too much time, I would like to know if someone in the
Radiant community has considered supporting DB2.
In order to support it, what should be needed? Is a compliant ruby db
adapter enough, or you have to tweak specific SQL statements somewhere
in
radiant code?

Thanks in advance

Luca

Luca Erzegovesi

University of Trento, Italy
[email protected]

On Wed, 25 Apr 2007, [email protected] wrote:

Before wasting too much time, I would like to know if someone in the
Radiant community has considered supporting DB2.
In order to support it, what should be needed? Is a compliant ruby db
adapter enough, or you have to tweak specific SQL statements somewhere in
radiant code?

Luca,

Radiant uses the Rails framework, which is where all the database
adapters
live… and it seems there are already three projects that are in
process
or already working.

http://wiki.rubyonrails.com/rails/pages/IBM+DB2

But it seems Radiant does have specific code to deal with different DB
engines. DB2 is on the list of engines to support, but no one is testing
it yet… except you!

http://radiantcms.org/blog/2006/05/09/improved-database-support/

I would think your testing will help this effort along.

Chris

Radiant uses Rails’ database adapters with very little modification (I
think there was a sqlite patch in there somewhere). Traditionally,
Rails has not supported DB2 well. Anything you could contribute to
improve the adapter would be appreciated in the Rails community at
large, I imagine.

Sean

[email protected] wrote:

Before wasting too much time, I would like to know if someone in the
Radiant community has considered supporting DB2.
In order to support it, what should be needed? Is a compliant ruby db
adapter enough, or you have to tweak specific SQL statements somewhere in
radiant code?

I’m happy to apply any patches to Radiant that allow it to support other
databases, but Radiant mostly relies on Rails to write the SQL. Getting
Radiant to run on another database has been relatively straightforward.
Databases occasionally seem to have problems with one of the
ArchiveIndexPages, but that is mostly a matter of updating the way
Radiant extracts date parts (month, day, year) from a date field.

I’d suggest that you do the following:

  1. Get Radiant’s test suite to pass on DB2

  2. Get migrations running on DB2

  3. Contribute changes to the DB2 database adapter back to Rails (if you
    have any)

  4. Send me a patch for Radiant (if it turns out that it needs one)


John L.
http://wiseheartdesign.com