User Tools

Site Tools


schema_0_9_10_upgrade_notes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
schema_0_9_10_upgrade_notes [2008/11/04 00:18]
daniel
schema_0_9_10_upgrade_notes [2008/11/04 13:27]
daniel
Line 167: Line 167:
 === All deletes and updates combined === === All deletes and updates combined ===
 <code sql> <code sql>
 +CREATE OR REPLACE VIEW all_mail AS SELECT * FROM mail UNION SELECT * FROM trashed_mail;​
 +
 DELETE FROM mail_addresses WHERE mail_id IN DELETE FROM mail_addresses WHERE mail_id IN
 (SELECT ma.mail_id FROM mail_addresses ma LEFT JOIN all_mail m ON ma.mail_id=m.mail_id WHERE m.mail_id IS NULL); (SELECT ma.mail_id FROM mail_addresses ma LEFT JOIN all_mail m ON ma.mail_id=m.mail_id WHERE m.mail_id IS NULL);
schema_0_9_10_upgrade_notes.txt ยท Last modified: 2008/11/04 13:27 by daniel