
paul at nfg
Jan 10, 2012, 6:11 AM
Post #2 of 2
(171 views)
Permalink
|
|
Re: How to prevent folder deletion (by owner) and/or prevent messages being deleted when a folder is deleted
[In reply to]
|
|
On 01/10/2012 01:05 PM, Daniel Schütze wrote: > So, would the best “quick fix” for me be to remove the foreign key > constraints to prevent the deletion of a mailbox having the knock-on > effect (i.e. of deleting all the contained messages from the folder from > the database) which I’m trying to avoid? If so, should I just remove > the dbmail_messages_ibfk_2 on dbmail_messages (cascade constraint on > dbmail_mailboxes mailbox_idnr/mailbox_idnr). If I make this change does > anyone know of any possible unforeseen consequences? The only one I can > envisage is a situation where a mailbox is deleted and then another > created (which I imagine could potentially have the same mailbox_idnr). If you remove that cascading constraint, messages in such a deleted inbox become unconnected. This will lead to them being harvested by dbmail-util -cy (implied by -ay). So you might want to re-assign those messages to a newly created archive box before running that. -- ________________________________________________________________ Paul J Stevens pjstevns @ gmail, twitter, skype, linkedin * Premium Hosting Services and Web Application Consultancy * www.nfg.nl/info [at] nfg/+31.85.877.99.97 ________________________________________________________________ _______________________________________________ DBmail mailing list DBmail [at] dbmail http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
|