From: richard Date: Fri, 24 May 2002 04:03:23 +0000 (+0000) Subject: Added commentage to the dbinit files to help people with their X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f04ca7e8c6067e05296508ed2b7c302425ffbcc8;p=roundup.git Added commentage to the dbinit files to help people with their customisation. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@761 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/roundup/templates/classic/dbinit.py b/roundup/templates/classic/dbinit.py index ba9642a..5e708e9 100644 --- a/roundup/templates/classic/dbinit.py +++ b/roundup/templates/classic/dbinit.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: dbinit.py,v 1.16 2002-02-16 08:06:14 richard Exp $ +# $Id: dbinit.py,v 1.17 2002-05-24 04:03:23 richard Exp $ import os @@ -47,7 +47,15 @@ def open(name=None): # open the database db = Database(instance_config, name) - # Now initialise the schema. Must do this each time. + # + # Now initialise the schema. Must do this each time the database is + # opened. + # + + # Class automatically gets these properties: + # creation = Date() + # activity = Date() + # creator = Link('user') pri = Class(db, "priority", name=String(), order=String()) pri.setkey("name") @@ -67,6 +75,9 @@ def open(name=None): alternate_addresses=String()) user.setkey("username") + # FileClass automatically gets these properties: + # content = String() [saved to disk in /db/files/] + # (it also gets the Class properties creation, activity and creator) msg = FileClass(db, "msg", author=Link("user"), recipients=Multilink("user"), date=Date(), summary=String(), @@ -76,6 +87,13 @@ def open(name=None): file = FileClass(db, "file", name=String(), type=String()) + # IssueClass automatically gets these properties: + # title = String() + # messages = Multilink("msg") + # files = Multilink("file") + # nosy = Multilink("user") + # superseder = Multilink("issue") + # (it also gets the Class properties creation, activity and creator) issue = IssueClass(db, "issue", assignedto=Link("user"), topic=Multilink("keyword"), priority=Link("priority"), status=Link("status")) @@ -88,8 +106,9 @@ def open(name=None): def init(adminpw): ''' as from the roundupdb method initDB - Open the new database, and set up a bunch of attributes. - + Open the new database, and add new nodes - used for initialisation. You + can edit this before running the "roundup-admin initialise" command to + change the initial database entries. ''' dbdir = os.path.join(instance_config.DATABASE, 'files') if not os.path.isdir(dbdir): @@ -122,6 +141,9 @@ def init(adminpw): # # $Log: not supported by cvs2svn $ +# Revision 1.16 2002/02/16 08:06:14 richard +# Removed the key property restriction on title of the classic issue class. +# # Revision 1.15 2002/02/15 07:08:44 richard # . Alternate email addresses are now available for users. See the MIGRATION # file for info on how to activate the feature. diff --git a/roundup/templates/extended/dbinit.py b/roundup/templates/extended/dbinit.py index 0c13a6f..7bddfee 100644 --- a/roundup/templates/extended/dbinit.py +++ b/roundup/templates/extended/dbinit.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: dbinit.py,v 1.20 2002-02-15 07:08:44 richard Exp $ +# $Id: dbinit.py,v 1.21 2002-05-24 04:03:23 richard Exp $ import os @@ -47,7 +47,15 @@ def open(name=None): # open the database db = Database(instance_config, name) - # Now initialise the schema. Must do this each time. + # + # Now initialise the schema. Must do this each time the database is + # opened. + # + + # Class automatically gets these properties: + # creation = Date() + # activity = Date() + # creator = Link('user') pri = Class(db, "priority", name=String(), order=String()) pri.setkey("name") @@ -67,6 +75,9 @@ def open(name=None): alternate_addresses=String()) user.setkey("username") + # FileClass automatically gets these properties: + # content = String() [saved to disk in /db/files/] + # (it also gets the Class properties creation, activity and creator) msg = FileClass(db, "msg", author=Link("user"), recipients=Multilink("user"), date=Date(), summary=String(), @@ -97,6 +108,13 @@ def open(name=None): date=Date(), time=String(), performedby=Link("user"), description=String()) + # IssueClass automatically gets these properties: + # title = String() + # messages = Multilink("msg") + # files = Multilink("file") + # nosy = Multilink("user") + # superseder = Multilink("issue") + # (it also gets the Class properties creation, activity and creator) support = IssueClass(db, "support", assignedto=Link("user"), status=Link("status"), rate=Link("rate"), source=Link("source"), @@ -118,8 +136,9 @@ def open(name=None): def init(adminpw): ''' as from the roundupdb method initDB - Open the new database, and set up a bunch of attributes. - + Open the new database, and add new nodes - used for initialisation. You + can edit this before running the "roundup-admin initialise" command to + change the initial database entries. ''' dbdir = os.path.join(instance_config.DATABASE, 'files') if not os.path.isdir(dbdir): @@ -174,6 +193,10 @@ def init(adminpw): # # $Log: not supported by cvs2svn $ +# Revision 1.20 2002/02/15 07:08:44 richard +# . Alternate email addresses are now available for users. See the MIGRATION +# file for info on how to activate the feature. +# # Revision 1.19 2002/01/14 02:20:15 richard # . changed all config accesses so they access either the instance or the # config attriubute on the db. This means that all config is obtained from