Uh oh!
There was an error while loading. Please reload this page.
Delete laboratory.workbooks reference on workbook container delete - #50
Conversation
bbimber
commented
Sep 16, 2020
@labkey-jeckels I believe the behavior of leaving the rows in laboratory.workbooks used to be by design, since that table used to be the table of record for workbook ID, and if we deleted a workbook we wanted to skip over that number. however, a long time ago LabKey started numbering workbooks incrementally by container, and we now defer to LK's numbering. I think your change is fine. I just have one question: did DatabaseDiagnosticsTest change or become more robust recently? I think the laboratory.workbooks purge (or lack of purge) behavior was fairly old. |
labkey-jeckels
commented
Sep 16, 2020
OK, thanks for confirming. The test hasn't changed, but it just started running in a suite that happened to exercise the lab workbook tests |
Rationale
DatabaseDiagnosticsTest is failing due to orphaned laboratory.workbooks rows that are missing their core.container row. A hard FK might be useful here, but it's possible that it would need to do a cascading delete of existing orphaned rows so keeping it simple for now.
Changes