VH-Lab / DID-matlab

Data Interface Database
Other
1 stars 1 forks source link

Documents and document data should be permanently removed when they are removed from all branches #55

Open stevevanhooser opened 1 year ago

stevevanhooser commented 1 year ago
  1. When documents are removed and exist on no branches, their cached files are not deleted; they should be.

  2. When documents are removed and exist on no branches, their field data is not removed. It should be.

Fixing subitem 2 will allow us not to have to fix subitem 3. Subitem 3 exists as long as item 2 remains unfixed. The best solution is just to fix item 2.

  1. We need to catch and explicitly disallow the situation where someone deletes a document and then tries to add it back (with the same id). While there are a few instances where this could work (if it exists on no other branches), it is most straightforward just to keep a list of deleted document IDs and not allow them to be re-added. Currently, because the field data is not removed from the table when documents are deleted and exist on no branches, this causes the unusual behavior of the document re-claiming its old field data (which is not updated with any new information). The fix is just not to allow one to add a new document with the same id as any document that has been deleted.
stevevanhooser commented 1 year ago

Hi Yair - I assigned this to you. Do you still have some hours left? Please work on the sql branch. Thanks, Steve