Under Review

Idea: pruneDatabase allow an older-than parameter

The pruneDatabase job deletes all records marked as deleted = 1 at the beginning of each month.

Users being users they sometimes change their mind about the deletion and not always in a timely fashion...

I'd like to suggest an additional parameter to the pruneDatabase job to allow admins to set a 'grace period' whereby the script prunes deleted records older than x-number-of-days.

Until then, I guess I'll create my own scheduled job for this purpose :)

thanks,
FrancescaS
Parents
  • One problem with trying to create a custom job is that some tables don't have a last modified date or even a create date, and even when they do date fields are not named consistently from table to table so there is no simple way to add to the query on the current prune job.

    Perhaps all tables with a delete field should also have a date_deleted field that can then be used for the purpose of pruning.

    Some table entries should only be deleted if the parent is deleted but, of course, that's not a generic statement.

    For example emails_text does not have any date fields and should be deleted when the parent record in the emails table is deleted.

Comment
  • One problem with trying to create a custom job is that some tables don't have a last modified date or even a create date, and even when they do date fields are not named consistently from table to table so there is no simple way to add to the query on the current prune job.

    Perhaps all tables with a delete field should also have a date_deleted field that can then be used for the purpose of pruning.

    Some table entries should only be deleted if the parent is deleted but, of course, that's not a generic statement.

    For example emails_text does not have any date fields and should be deleted when the parent record in the emails table is deleted.

Children
No Data