summaryrefslogtreecommitdiff
path: root/Mailman/database/model/message.py
diff options
context:
space:
mode:
authorBarry Warsaw2007-11-10 13:14:51 -0500
committerBarry Warsaw2007-11-10 13:14:51 -0500
commit58b8ca1c929c5bc0ea1b36fb5e6e683a8830e963 (patch)
tree4d87cdececa390c0bcc1460f60c6102e0e81f87d /Mailman/database/model/message.py
parent3d7b9702e4ff97f86025f8d7ae9b29220f5bf264 (diff)
downloadmailman-58b8ca1c929c5bc0ea1b36fb5e6e683a8830e963.tar.gz
mailman-58b8ca1c929c5bc0ea1b36fb5e6e683a8830e963.tar.zst
mailman-58b8ca1c929c5bc0ea1b36fb5e6e683a8830e963.zip
All the simple test fixes are now in, and while there are still some failing
tests, we're making very good progress. Just the tough ones are left. This change did modify the the schema a bit, for better naming and typing. E.g. 'type' -> 'request_type' and using a RawStr for a hash type.
Diffstat (limited to 'Mailman/database/model/message.py')
-rw-r--r--Mailman/database/model/message.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/Mailman/database/model/message.py b/Mailman/database/model/message.py
index 7a6d7371a..c4ea4a636 100644
--- a/Mailman/database/model/message.py
+++ b/Mailman/database/model/message.py
@@ -18,6 +18,7 @@
from storm.locals import *
from zope.interface import implements
+from Mailman.configuration import config
from Mailman.database import Model
from Mailman.interfaces import IMessage
@@ -28,8 +29,14 @@ class Message(Model):
implements(IMessage)
- id = Int(primary=True)
- hash = Unicode()
- path = Unicode()
- # This is a Messge-ID field representation, not a database row id.
+ id = Int(primary=True, default=AutoReload)
message_id = Unicode()
+ hash = RawStr()
+ path = RawStr()
+ # This is a Messge-ID field representation, not a database row id.
+
+ def __init__(self, message_id, hash, path):
+ self.message_id = message_id
+ self.hash = hash
+ self.path = path
+ config.db.store.add(self)