drizzle-orm-fk-omission-causes-orphaned-rows
Drizzle ORM supports foreign key constraints via .references() but they must be explicitly declared — the ORM does not infer or enforce them from column naming conventions alone. A schema with teamId, assigneeId, creatorId as plain integer columns (no .references()) will silently allow orphaned rows on any parent deletion. Always verify .references() is present on every FK column in Drizzle schemas before shipping.