"At GitHub we do not use foreign keys, ever, anywhere" (2016)
github.com
github.com
Dismissing an important feature -- foreign keys -- because of a migration tool communicates some ignorance of the relational model, ACID, and a bias to application code generating the database schema, rather than the database shaping the application code. Learn SQL.
"Some data left dangling in some table" is the least of the problems. Selecting from those tables will fail to join the parent, or get nulls for the parent columns, depending on the join type. A COUNT(*) or other aggregate function over the orphaned child table will count the orphans. If the parent primary keys get re-used for new rows the orphaned children may end up pointing to the wrong parent. Databases have things like foreign keys to prevent anomalies like this, you shouldn't just conclude it's not worth the trouble now because you will deal with that mistake later.
"Proven to be false in many cases" with not a single example is just an opinion without evidence. The benefit of foreign keys has decades of actual documentation.
Performance impact may or may not matter. You don't discard valuable techniques and decades of experience for a "might happen." You measure and identify actual performance and adjust with facts. All indexes have both a performance benefit and a performance cost, incurred in the first case when selecting, and in the second case when updating. The performance benefit and cost of foreign keys comes from the index created. You get protection from update anomalies almost for free.
“Some comments in the HN thread seem to confuse the logical referential integrity of the relational model, and the FOREIGN KEY constraint, which is a construct where the database enforces the referential integrity.
We do use tables with ‘id’s and tables referencing those ‘id’s. We do not use FOREIGN KEY constraints in our table definitions.”