TreeBASE / treebase

Source code for TreeBASE web application and database
http://www.treebase.org
BSD 3-Clause "New" or "Revised" License
9 stars 2 forks source link

Orphaned records and failure to delete related records #160

Open ghost opened 14 years ago

ghost commented 14 years ago

The database contains many orphaned objects. For example, under the Taxa tab, search on NCBI taxid 114498, then click either the Trees or Matrices tabs. This results in records even though none of them belong to an existing study. The problem is in part because trees and matrices don't actually get deleted properly: create a submission, upload trees or matrices, then delete the trees or matrices -- the only thing that is deleted is the linking record in the sub_matrix table. None of the column records, row records, or element records (etc) seem to get deleted. Youjun explained that the design of the matrix object does not allow the code to access the matrix rows (etc) for easy deletion. One possible solution is to include cascade-delete constraints on the tables so that deleting a matrix record automatically delete all related records without leaving behind any orphans. At any rate, it behooves us to prevent the accumulation of orphans and to write data cleansers to get rid of the existing ones.

Reported by: piel

ghost commented 14 years ago

Needs to be verified first that the bug still replicates.

Original comment by: hlapp

ghost commented 14 years ago

Original comment by: hlapp

ghost commented 14 years ago

Original comment by: hlapp