drizzle-orm-fk-not-implicit-must-use-references
Drizzle ORM does NOT automatically infer foreign key constraints from column naming conventions (e.g., teamId, assigneeId). FK enforcement requires explicit .references() declarations on each column. Omitting them creates plain integer columns with no DB-level constraint, guaranteeing orphaned rows on any deletion. This is a silent data integrity failure that Drizzle’s type system will not catch.
Related
- drizzle-orm-fk-omission-causes-orphaned-rows
- drizzle-fk-references-omitted-by-default-causes-orphans
- drizzle-orm-fk-not-implicit-requires-references
- drizzle-orm-foreign-keys-not-auto-enforced
- drizzle-orm-does-not-auto-enforce-foreign-keys
- drizzle-schema-fk-omission-causes-orphaned-rows
- drizzle-orm-supports-fk-references-must-be-declared-explicit
- drizzle-orm-foreign-keys-not-added-automatically