ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

Provide a library function to detect the database type used (Feature #112)

Added by Holger Just at 2011-01-29 02:00 pm. Updated at 2011-05-19 09:29 pm.

Status:Closed Start date:2011-01-29
Priority:Normal Due date:
Assignee:Holger Just % Done:


Target version:2.0.0
Remote issue URL: Affected version:


ActiveRecord::Base.connection.adapter_name works not fully reliable for multiple adapter variants used in the wild. One example is the difference between MySQL for the mysql adapter and mysql2 for the mysql2 adapter.

For the rare cases where it is necessary to distinguish database types for specific SQL code, detection should be done reliable and in a single place to update it when necessary.

Associated revisions

Revision 82791440
Added by Holger Just at 2011-05-15 11:14 pm

[#112] Add ChiliProject::Database

This module can be used to gather information about the currently used

Revision d9010242
Added by Holger Just at 2011-05-15 11:15 pm

[#112] Adapt database switches to use ChiliProject::Database

Revision 705c0db0
Added by Holger Just at 2011-05-16 12:01 am

[#112] Fix failing raw version for postgres

Revision 6a55e9e7
Added by Felix Schäfer at 2011-05-19 11:28 pm

Merge pull request #57 from meineerde/issues/unstable/112-database-detection-library

Database detection library. #112

Revision d7b963e6
Added by Felix Schäfer at 2011-05-20 04:10 pm

Load the SQLite3 lib for the test to work. #112

Revision c04ff93f
Added by Holger Just at 2011-05-20 11:34 pm

[#112] Properly stub SQLite3 for version tests

Revision 35a38086
Added by Holger Just at 2011-05-22 07:46 pm

[#112] Fix tests for jruby


Updated by Felix Schäfer at 2011-02-01 10:49 pm

  • Status set to Open

Updated by Holger Just at 2011-05-15 09:18 pm

  • Status changed from Open to Ready for review

Updated by Felix Schäfer at 2011-05-16 08:39 am

Haven't tested it, but looks sound to me.

  • Target version set to 1.4.0

Updated by Felix Schäfer at 2011-05-19 09:29 pm

Merged in 6a55e9e7389647525f869fc168948ece04efa275, moved to unstable for inclusion in 2.0.0 though.

  • Target version changed from 1.4.0 to 2.0.0
  • Status changed from Ready for review to Closed

Also available in: Atom PDF