c3-time-domain / SeeChange

A time-domain data reduction pipeline (e.g., for handling images->lightcurves) for surveys like DECam and LS4
BSD 3-Clause "New" or "Revised" License
0 stars 4 forks source link

Cascading database deletes don't clean up archive / disk #351

Open rknop opened 2 months ago

rknop commented 2 months ago

The example I'm seeing right now is in test teardown:

The teardown that deletes provenances cascade to other objects. This removes them from the database, but does not call the delete_from_database_and_disk function.

The solution is probably to change the foreign key delete condition from CASCADE to RESTRICT for all objects that use provenances. This will probably require us to go through tests and make sure we're doing things in the right order.