kitodo / kitodo-production

Kitodo.Production is a workflow management tool for mass digitization and is part of the Kitodo Digital Library Suite.
http://www.kitodo.org/software/kitodoproduction/
GNU General Public License v3.0
60 stars 65 forks source link

No clean up of batch processes relations if a process is deleted #1054

Closed henning-gerhardt closed 6 years ago

henning-gerhardt commented 6 years ago

If a process is part of at least one batch and this process get deleted then the relation in table batchesprozesse still contain the entry or entries for this process.

Correct behaviour should that a deleted process should be removed from this relation table.

Affected version: Kitodo.Production 2.0.0 with MyISAM engine based database

henning-gerhardt commented 6 years ago

Batch process relation ship table could be cleaned up manually through:

DELETE FROM `batchesprozesse` AS bp LEFT JOIN `prozesse` AS p on p.`ProzesseID` = bp.`ProzesseID` WHERE p.`ProzesseID` IS NULL;

after a database backup is done

henning-gerhardt commented 6 years ago

PR #1055 is merged as a possible solution.