Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Patch to enable --database=ibm_db

#1136

The --database option currently accepts the following values: mysql/oracle/postgresql/sqlite2/sqlite3/frontbase. Notice that the existing generators are not limited to the core adapters only.

The attached patch adds support for ibm_db, as well. Running: rails my_app -d ibm_db will generate a config/database.yml file that is tailored for the ibm_db adapter.

Reported by Antonio Cangiano · September 29th, 2008 @ 07:02 PM

State: resolved
Milestone: 2.x
Assigned to: Pratik Pratik
Importance: none

Activity

  1. Nuno Job
    Nuno Job

    I have been using Ruby on Rails/DB2/XML for quite some time. This would turn things easier for other developers like myself. Nice idea!

    October 2nd, 2008 @ 04:23 PM

  2. Philip Nelson
    Philip Nelson

    Something I've been wanting to happen for so long !!!

    I can't imagine how many times I've patched the Rails code manually in the last two years or so, since I started doing Rails development with DB2.

    Phil Nelson ScotDB Limited

    October 2nd, 2008 @ 07:59 PM

  3. Leonardo Borges
    Leonardo Borges

    That really sounds nice!

    I found myself patching rails code as well and this would be a huge step forward.

    At our company we still go a bit further and use DB2's native XML support with rails, so this is definitely something we'd like to see.

    October 2nd, 2008 @ 08:16 PM

  4. Pratik
    Pratik
    • Assigned user set to Pratik

    October 3rd, 2008 @ 12:50 AM

  5. Pratik
    Pratik

    Looks nice. Some suggestions :

    • Please use 'development', 'test', '_production' postfixes.
    • Instead of commented values for schema, host, port, account etc. why not fill sensible defaults ? Not being an IBM DB user, I don't know what they might be.
    • I'd skip those tests

    Thanks.

    October 3rd, 2008 @ 01:01 AM

  6. Antonio Cangiano
    Antonio Cangiano

    Pratik, thank you for reviewing the patch.

    I proceeded with reviewing the patch developed by the API development team, and changed a few things, also incorporating some of your suggestions.

    A couple of important considerations are in order though:

    • The development, test and _production postfixes are not acceptable for DB2. This is due to the fact that database names are currently limited to 8 characters. This is why the resulting database names are derived from the application name (truncated to 4 characters) and contracted postfixes;

    • I changed the parameters for which default values exist, to their defaults. That said, some of the optional parameters are entirely arbitrary and have no defaults, as such I placed obvious placeholders. The password field is empty for the other adapters, so I left it blank as well.

    I think the resulting config/database.yml file looks good, all things considered and it's ready to be introduced into the core.

    Thank you, Antonio

    October 3rd, 2008 @ 02:42 AM

  7. Antonio Cangiano
    Antonio Cangiano

    Please find attached the new patch.

    Thanks.

    October 3rd, 2008 @ 02:52 AM

  8. Repository
    Repository
    • State changed from new to resolved

    (from [f0e90740d0ca35b3fae5cf367334929534c35555]) Add IMB DB support to Rails application generator. [#1136 Patch to enable --database=ibm_db state:resolved]

    Usage : rails app_name -d ibm_db

    Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...

    October 4th, 2008 @ 01:56 PM