This project is archived and is in readonly mode.
Patch to enable --database=ibm_db
Reported by Antonio Cangiano | September 29th, 2008 @ 07:02 PM | in 2.x
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.
Comments and changes to this ticket
-
Nuno Job October 2nd, 2008 @ 04:23 PM
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!
-
Philip Nelson October 2nd, 2008 @ 07:59 PM
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
-
Leonardo Borges October 2nd, 2008 @ 08:16 PM
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.
-
Pratik October 3rd, 2008 @ 12:50 AM
- Assigned user set to Pratik
-
Pratik October 3rd, 2008 @ 01:01 AM
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.
-
Antonio Cangiano October 3rd, 2008 @ 02:42 AM
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
-
-
Repository October 4th, 2008 @ 01:56 PM
- State changed from new to resolved
(from [f0e90740d0ca35b3fae5cf367334929534c35555]) Add IMB DB support to Rails application generator. [#1136 state:resolved]
Usage : rails app_name -d ibm_db
Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 1136 Patch to enable --database=ibm_db (from [f0e90740d0ca35b3fae5cf367334929534c35555]) Add IMB...