Issue relation table doesn't have constraints to issues id
I have a Redmine 1.0.4 running on MySQL. For some reason I didn't discovered it, at some time there was a lot of entries in 'issues_relation' table referencing deleted issues. This caused the defect #7018 and may cause some other problems in the future.
#1 Updated by Jean-Philippe Lang almost 7 years ago
Of course, FK would be a clean solution to ensure that this problem never occurs but Rails doesn't provide support for FK.
That said, the rows in issue_relations should be deleted by the application when deleting one of the issues. Do you know a way to reproduce this situation?
#2 Updated by Bruno Medeiros almost 7 years ago
Jean, I the last 3 weeks I was trying some plugins and external tools to import MS Project files into Redmine. The first plugin I tried was:
I prefer to think that it was caused to some abrupt termination of the server then a plugin's fault, but everything need to be considered.
I loaded tons of issues (400+) in a row and deleted then using the issue tab several times (load via plugin, see the results, select all, right click, delete). I tried to reproduce that without success. It can be a combination of factors, like server being stopped when deleting issues, or something like that. Don't know if it's worth worry about it...