You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
themerekat
changed the title
When you delete a parent checklist, linkages to child checklists is not also deleted
When you delete a parent checklist, linkages to child checklists are not also deleted
Jun 19, 2023
Unable to reproduce this issue, and also inspected the code and found no parent/child restrictions in place for deleting a checklist. Furthermore, the schema is defined to automatically delete parent/child linkages whenever a checklist record is removed.
However, I'm guess this is due to that within the PteridoPortal one can't delete a checklist when it contains linked taxa. Doing so produces the following error. This has long been resolved, but the pteridoPortal has not been updated since before June 2022. Updating the code will resolve this issue.
ERROR attempting to delete checklist: Cannot delete or update a parent row: a foreign key constraint fails (symbfern.fmchklsttaxalink, CONSTRAINT FK_chklsttaxalink_cid FOREIGN KEY (CLID) REFERENCES fmchecklists (CLID))
This prevents the child checklist from being delete-able.
See this child checklist, for example: https://www.pteridoportal.org/portal/checklists/checklist.php?clid=23376&pid=0
The text was updated successfully, but these errors were encountered: