On Friday 12 October 2001 09:09, Brad Clements wrote:
> I'm trying to add a new class type (I think that's the terminology)
> I've edited dbinit.py and the templates to add an itype (type String) and
> linked it to Issue just like priority.
I assume you did something like added this to open():
itype = Class(db, "itype",
and modified the issue class like:
issue = IssueClass(db, "issue",
> I also changed the list of strings for products and priority.
If you've already created your instance, you'll need to do this manually
using the roundup-admin tool. Editing the init function of dbinit, once the
instance is created, will not affect anything. Only changes to the open
function will have any effect.
Specifically, you'll need to use the "retire" and "create" functions of the
admin tool. "retire" lets you remove the current entries. "create" adds the
new ones. Use the "list" function to determine the list of current entries.
> What steps do I take now to update the database with these new values in
You can edit them using any of the three interfaces, but the easiest is
probably the command-line tool, roundup-admin. Use the "list" function to
list the current nodes, and the "set" function to set the itype property
value for them.
> Can I update the database without whiping existing issues?
Changes to the schema defined in the open() function should not break the
database. Changing it doesn't actually alter any existing data in the
database. If you add a property, the database routines will handle the fact
the old nodes don't have the new property.
I'll try to add something to the documentation about this.