CDash icon indicating copy to clipboard operation
CDash copied to clipboard

Add foreign key constraints to database

Open williamjallen opened this issue 2 years ago • 0 comments

We currently lack any sort of automated referential data integrity validation. This means that stale data may accumulate in tables if entities are not deleted properly. This also means that it is possible for data errors to go unnoticed, resulting in bugs which are difficult to track down.

It would be good to set up foreign key constraints for each of our relations. Doing so is not necessarily straightforward however. We currently have a number of places where data is not deleted appropriately and it is possible for entities to violate a new constraint. In these instances, the most practical option is probably to just delete the row which doesn't meet the constraint.

williamjallen avatar May 24 '23 18:05 williamjallen