drizzle-orm-foreign-keys-not-implicit

Drizzle ORM supports foreign key constraints via .references() on column definitions, but they are NOT added by default when you declare an integer column referencing another table. Without explicit .references(), all relational integrity is unenforced at the DB level — orphaned rows accumulate on deletion. Every cross-table integer column (userId, teamId, taskId, etc.) requires an explicit .references(() => table.id) declaration.