You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I have a source table that declares a belongs_to relationship with a target table and this is declared as a foreign key on the database but we have not declared a corresponding has_many or has_one with a dependent: clause, then deleting a source record will cause SQL errors because the foreign keys will no longer be valid.
Is this a situation that can be detected by database_consistency? I had thought that ForeignKeyCascadeChecker might do this, but it appears to be only covering situations where the db is not duplicating cascading deletes for non-destroy methods.
If it isn't covered then are you aware of any other tools that might be able to report on this potential issue?
The text was updated successfully, but these errors were encountered:
If I have a source table that declares a
belongs_to
relationship with a target table and this is declared as a foreign key on the database but we have not declared a correspondinghas_many
orhas_one
with adependent:
clause, then deleting a source record will cause SQL errors because the foreign keys will no longer be valid.Is this a situation that can be detected by
database_consistency
? I had thought thatForeignKeyCascadeChecker
might do this, but it appears to be only covering situations where the db is not duplicating cascading deletes for non-destroy methods.If it isn't covered then are you aware of any other tools that might be able to report on this potential issue?
The text was updated successfully, but these errors were encountered: