drizzle-team / drizzle-team/drizzle-orm

[DOCS]: Foreign key actions clarification

Open
#4,837 1 comment 0 reactions 0 assignees View on GitHub
docs
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### Enhancement hasn't been filed before.

- [x] I have verified this enhancement I'm about to request hasn't been suggested before.

### Describe the enhancement you want to request

The [Foreign key actions](https://orm.drizzle.team/docs/relations#foreign-key-actions) part in `RESTRICT` only specify its inclusion for "compatibility reason".

> Similar to NO ACTION, it prevents the deletion of a parent row if there are dependent rows in the child table. It is essentially the same as NO ACTION and included for compatibility reasons.

But the [PostgreSLQ documentation for foreign keys](https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-FK) is more precise:

> The essential difference between these two choices is that NO ACTION allows the check to be deferred until later in the transaction, whereas RESTRICT does not.

Does Drizzle maintain the same behavioral distinction?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.