1515# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717#
18- # $Id: dbinit.py,v 1.20 2002-02-15 07:08:44 richard Exp $
18+ # $Id: dbinit.py,v 1.21 2002-05-24 04:03:23 richard Exp $
1919
2020import os
2121
@@ -47,7 +47,15 @@ def open(name=None):
4747 # open the database
4848 db = Database (instance_config , name )
4949
50- # Now initialise the schema. Must do this each time.
50+ #
51+ # Now initialise the schema. Must do this each time the database is
52+ # opened.
53+ #
54+
55+ # Class automatically gets these properties:
56+ # creation = Date()
57+ # activity = Date()
58+ # creator = Link('user')
5159 pri = Class (db , "priority" ,
5260 name = String (), order = String ())
5361 pri .setkey ("name" )
@@ -67,6 +75,9 @@ def open(name=None):
6775 alternate_addresses = String ())
6876 user .setkey ("username" )
6977
78+ # FileClass automatically gets these properties:
79+ # content = String() [saved to disk in <instance home>/db/files/]
80+ # (it also gets the Class properties creation, activity and creator)
7081 msg = FileClass (db , "msg" ,
7182 author = Link ("user" ), recipients = Multilink ("user" ),
7283 date = Date (), summary = String (),
@@ -97,6 +108,13 @@ def open(name=None):
97108 date = Date (), time = String (),
98109 performedby = Link ("user" ), description = String ())
99110
111+ # IssueClass automatically gets these properties:
112+ # title = String()
113+ # messages = Multilink("msg")
114+ # files = Multilink("file")
115+ # nosy = Multilink("user")
116+ # superseder = Multilink("issue")
117+ # (it also gets the Class properties creation, activity and creator)
100118 support = IssueClass (db , "support" ,
101119 assignedto = Link ("user" ), status = Link ("status" ),
102120 rate = Link ("rate" ), source = Link ("source" ),
@@ -118,8 +136,9 @@ def open(name=None):
118136def init (adminpw ):
119137 ''' as from the roundupdb method initDB
120138
121- Open the new database, and set up a bunch of attributes.
122-
139+ Open the new database, and add new nodes - used for initialisation. You
140+ can edit this before running the "roundup-admin initialise" command to
141+ change the initial database entries.
123142 '''
124143 dbdir = os .path .join (instance_config .DATABASE , 'files' )
125144 if not os .path .isdir (dbdir ):
@@ -174,6 +193,10 @@ def init(adminpw):
174193
175194#
176195# $Log: not supported by cvs2svn $
196+ # Revision 1.20 2002/02/15 07:08:44 richard
197+ # . Alternate email addresses are now available for users. See the MIGRATION
198+ # file for info on how to activate the feature.
199+ #
177200# Revision 1.19 2002/01/14 02:20:15 richard
178201# . changed all config accesses so they access either the instance or the
179202# config attriubute on the db. This means that all config is obtained from
0 commit comments