Author: barry.warsaw
Date: Sun Mar 20 15:12:36 2005
New Revision: 37
Modified:
trunk/mailman/src/mailman/database/schema.py
Log:
Flesh out list styles, attributes, and policies.
Modified: trunk/mailman/src/mailman/database/schema.py
==============================================================================
--- trunk/mailman/src/mailman/database/schema.py (original)
+++ trunk/mailman/src/mailman/database/schema.py Sun Mar 20 15:12:36 2005
@@ -43,6 +43,8 @@
request_response = ForeignKey('Autoresponse', default=None)
archives = ForeignKey('MessageCollection')
owner_archives = ForeignKey('MessageCollection')
+ list_style = ForeignKey('ListStyle')
+ overrides = ForeignKey('AttributeGroup')
@@ -155,6 +157,45 @@
_cacheValue = False
# Attributes
message = RelatedJoin('Message')
+
+
+
+class Attribute(SQLObject):
+ _cacheValue = False
+ # Attributes
+ name = UnicodeCol()
+ type = EnumCol(enumValues=['TEXT', 'NUMBER',
+ 'DATETIME', 'BOOL',
+ ])
+ default_value = UnicodeCol()
+
+
+class AttributeGroup(SQLObject):
+ _cacheValue = False
+ # Attributes
+ collection_name = UnicodeCol()
+ list_styles = RelatedJoin('ListStyle')
+
+
+class AttributeValue(SQLObject):
+ _cacheValue = False
+ # Attributes
+ name = UnicodeCol()
+ group = ForeignKey('AttributeGroup')
+ value = UnicodeCol()
+ policy = EnumCol(enumValues=['LOCKED', 'ADVANCED', 'BASIC'])
+
+
+class ListStyle(SQLObject):
+ _cacheValue = False
+ # Attributes
+ name = UnicodeCol()
+ groups = RelatedJoin('AttributeGroup')
+
+
+# XXX For performance reasons, because these tables are so normalized, we
+# could generate a lookup table which will only change when an attribute has
+# changed.
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org