drizzle-orm-supports-fk-references-must-be-declared-explicitly

Drizzle ORM does not infer foreign key constraints from column naming conventions — plain int columns named teamId or assigneeId create no referential integrity at the database level. The .references() call must be added explicitly to each FK column in the schema definition. Omitting it guarantees orphaned rows on any deletion and silently violates ‘zero-ambiguity’ data integrity; the app compiles and runs without error until data corruption surfaces at runtime.