Mercurial > p > roundup > code
diff roundup/templates/extended/dbinit.py @ 748:2e70123bbf5a
Added commentage to the dbinit files to help people with their customisation.
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 24 May 2002 04:03:23 +0000 |
| parents | edd210915e64 |
| children | 0779ea9f1f18 |
line wrap: on
line diff
--- a/roundup/templates/extended/dbinit.py Fri May 24 03:12:39 2002 +0000 +++ b/roundup/templates/extended/dbinit.py Fri May 24 04:03:23 2002 +0000 @@ -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 @@ # 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 @@ alternate_addresses=String()) user.setkey("username") + # FileClass automatically gets these properties: + # content = String() [saved to disk in <instance home>/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 @@ 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 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 @@ # # $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
