Open simsong opened 1 year ago
Does "purge old" imply that deleted movies are kept for a (specified, configurable) period of time?
Right now they are kept forever. We need to have a program that purges (removes from the database) movies that are still deleted after XXX days. This may require rethinking some of the referential integrity issues. I'm removing referential integrity from the logs
table, for instance, so that we can delete users/courses/movies even if we have logged information about them.
Agreed that the log table would be better off w/o referential integrity constraints.
Detecting how long a movie has been deleted. logs.timet is one way, though the selection query would have to consider the values of logs.func*, and then run the delete on movies and related tables. Adding a movies.date_modified might be a less edge-case prone approach.
Agreed. The table should have a column that automatically gets updated whenever any column in the row is modified. I normally put this in all of my tables; I will make sure this one has it.
purge the old movies that have been deleted.