SONAR-4923 Fix migration when rule_notes or active_rule_notes are linked to not existing rules or active_rules