Opened 13 years ago
Last modified 12 years ago
#9842 closed enhancement
Make database connectors reusable — at Initial Version
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | high | Milestone: | 1.0 |
Component: | database backend | Version: | 0.12.1 |
Severity: | normal | Keywords: | patch |
Cc: | Thijs Triemstra | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I'm currently working on a project that needs a separate database. So I'd like to use Trac's database connectors (or database api in more general). However, they were not implemented for this use case.
I've created a patch that changes the init_db()
method so that the schema isn't hard-coded anymore but is passed as argument to the method. This is the first (and IMHO most pressing) step to allow reusability.
A second step (which isn't covered in my patch) would be to make the class trac.db.db.DatabaseManager
reusable in that the db URI isn't hard-coded anymore but passed as argument somehow.
Note: The patch I've attached to this ticket also contains the patch from #9841. Sorry about this.
Patch against Trac 0.12.1