From 2d2d5393acc7db23baf4f3d43a0712bfa795c03e Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Sun, 22 Feb 2009 21:33:17 -0500 Subject: Get rid of one_last_digest. Move this into a separate OneLastDigest table. Make it explicit to get the last digest (I could imagine an user selecting not to). Actually add tests for this. Start to get rid of 'from storm.locals import *' in favor of more specific imports. Start to use Store.of() instead of config.db.store where we can. Rework (delivery)MemberRosters to use the Member attributes. This ensures that the layered lookup happens at the expense of query optimization. Sundry and various cleanups. --- src/mailman/database/mailman.sql | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/mailman/database/mailman.sql') diff --git a/src/mailman/database/mailman.sql b/src/mailman/database/mailman.sql index c46fb193e..79a28574e 100644 --- a/src/mailman/database/mailman.sql +++ b/src/mailman/database/mailman.sql @@ -54,7 +54,6 @@ CREATE TABLE mailinglist ( next_request_id INTEGER, next_digest_number INTEGER, digest_last_sent_at TIMESTAMP, - one_last_digest BLOB, volume INTEGER, last_post_time TIMESTAMP, accept_these_nonmembers BLOB, @@ -178,6 +177,17 @@ CREATE TABLE message ( message_id TEXT, PRIMARY KEY (id) ); +CREATE TABLE onelastdigest ( + id INTEGER NOT NULL, + mailing_list_id INTEGER, + address_id INTEGER, + delivery_mode TEXT, + PRIMARY KEY (id), + CONSTRAINT onelastdigest_mailing_list_id_fk + FOREIGN KEY(mailing_list_id) REFERENCES mailinglist(id), + CONSTRAINT onelastdigest_address_id_fk + FOREIGN KEY(address_id) REFERENCES address(id) + ); CREATE TABLE pended ( id INTEGER NOT NULL, token TEXT, -- cgit v1.2.3-70-g09d2