drizzle-orm-missing-foreign-key-references-causes-orphaned-rows
Drizzle ORM does NOT enforce foreign keys by default — all relational columns (teamId, assigneeId, creatorId, etc.) must explicitly use .references() or orphaned rows are guaranteed on any deletion. This is a schema-level gotcha: the schema compiles and runs fine without .references(), but data integrity is silently broken.
Related
- drizzle-orm-does-not-auto-enforce-foreign-keys
- drizzle-orm-foreign-keys-not-implicit-must-use-references
- drizzle-orm-foreign-keys-not-auto-enforced
- drizzle-fk-references-omitted-by-default-causes-orphans
- drizzle-orm-fk-references-commonly-omitted
- taskflow-drizzle-missing-foreign-keys-data-integrity
- drizzle-orm-foreign-keys-not-enforced-by-default