Flushing old Todos and their documents

Posted:
Tue Sep 28, 2021 6:59 pm
by SBarnes
Are then any gotchas if we want to flush out to dos and any attached documents that are older than a given date
Re: Flushing old Todos and their documents 

Posted:
Wed Sep 29, 2021 11:48 am
by Mike.Sheen
You'' need to be aware of the dependencies - the business logic won't let you delete a todo whilst another todo is dependent on it.
If you plan on deleting using SQL and not the business logic, there is a foreign key from some tables to the TD_Main record, and they don't have delete cascade, you'll need to delete those first - TD_Notes, TD_Documents, TD_Collaborations, TD_Dependencies.
Be aware also that the TD_Dependencies is a two-way relationship - so if deleting via SQL you'll need to delete from TD_Dependencies where TD_Main_RecID_Dependent or TD_Main_RecID_Dependency is equal to the RecID of the ToDo you want to delete.