Roundup Tracker - Issues

Issue 2550852

classification
Title: patch for creating trackers within Postgresql schema
Type: rfe Severity: normal
Components: Database Versions: devel, 1.5
process
Status: new Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ber, rouilj, smcgraw
Priority: Keywords: patch

Created on 2014-09-13 05:15 by smcgraw, last changed 2016-04-09 05:24 by rouilj.

Files
File name Uploaded Description Edit Remove
schema.patch smcgraw, 2014-09-13 05:15 patch to back_postgresql.py for using pg schemas.
Messages
msg5142 Author: [hidden] (smcgraw) Date: 2014-09-13 05:15
The attached patch modifies backends/back_postgresql.py to allow 
Roundup to create and use a roundup tracker in a Postgresql schema
(as opposed to requiring a separate database as formerly).  This
allows multiple trackers to share a single database.

Having multiple trackers in separate schema of a single database
can simplify management of the trackers and offers options for
aggregated reporting.

The possibility was discussed in the roundup users email list, 
 "Data in postgres 'trackers' database, 'helpdesk' schema.",
 Tom Ekberg <tekberg@uw.edu>, 2014-08-29.
The approach used largely follows the suggestions of John P. 
Rouillard in 
 http://sourceforge.net/p/roundup/mailman/message/32777168/.

After applying the attached patch, use of a Postgresql schema 
is requested by setting a RDBMS name value in the config file 
with a dot and schema name following the database name.  E.g., 
"roundup.myschema". (This is the same syntax used in Postgresql 
and in standard SQL for referencing a schema.)  If only the
database name is given, Roundup's behavior is as it was before.

When initializing a new tracker and the use of a schema is 
specified, the database must already exist and the roundup user 
must have been granted "create" privilege (allows the creation 
of new schema) in the named database when "roundup-admin init"
is run.

The patch is incomplete (e.g., requires at least doc updates and 
tests) but I wanted to verify the approach is acceptable before 
spending more time on it.  I am also not totally sure that the "." 
in the rdbms name won't cause a problem elsewhere in the Roundup 
code.  

The patch is against the development version of Roundup as of 
rev 5a59c723e57f (2014-09-06) but applies ok to the 1.5.0 version 
with "patch --fuzz=3 ...".
msg5144 Author: [hidden] (ber) Date: 2014-09-15 09:29
Hi Stuart, 

thanks for the patch. Let us see what others have to say about it.

Regards,
Bernhard
msg5511 Author: [hidden] (rouilj) Date: 2016-04-09 05:24
I realized this has languished for a while, but it looks reasonable to me.
History
Date User Action Args
2016-04-09 05:24:23rouiljsetnosy: + rouilj
messages: + msg5511
2014-09-15 09:29:49bersetnosy: + ber
messages: + msg5144
2014-09-13 05:15:01smcgrawcreate