freeCodeCamp / mail-for-good

An open source email campaign management tool for nonprofits
BSD 3-Clause "New" or "Revised" License
3.83k stars 476 forks source link

After deleting campaign, shouldn't the campaign subscriber be deleted too? #210

Open shaikh-shahid opened 6 years ago

shaikh-shahid commented 6 years ago

Trying it on local

Added around 1000 subs and created a campaign. After deleting the campaign, entries in compain subs tables persists, which I think should be deleted.

If there is any reason to keep them then let me know otherwise I will send a PR for a fix.

Thanks.

karuppiah7890 commented 6 years ago

@codeforgeek In Email marketing, people send multiple campaigns to the same list of subscribers. So, deleting a campaign shouldn't lead to deleting the subscribers

shaikh-shahid commented 6 years ago

No you don't get it.

That part of subscribers is stored in list and list subscriber table. When we create compain and choose list, then that piece goes to compainsubscriber table. entries in that table should get deleted if we delete the compaign. Not from list or listsubscriber of course.

karuppiah7890 commented 6 years ago

Sorry, I thought you meant from a user's pov. You mean the database tables and entries; that's some technical stuff. I need to look into this.

AndrewWalsh commented 6 years ago

@codeforgeek Agreed - this shouldn't happen. Will address this.

shaikh-shahid commented 6 years ago

@AndrewGHC Let me help then! Will send PR.