PG::ForeignKeyViolation: ERROR: update or delete on table “xxx” violates foreign key constraint
问题 I have several tables that have foreign key constraints associated with them, each referencing the other in a hierarchical fashion as outlined below. When I try to destroy a Company that has at least 1 Project, that has at least 1 Task, that has at least 1 TaskTime like so... irb(main):014:0> Company.first.destroy I get the below output and error. I am under the impression now that simply having dependent: :delete_all doesn't deal with the foreign key constraints, is this true? If so, how do