Skip to content

Commit

Permalink
remove onDelete reference
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolasburk committed Jan 22, 2020
1 parent 3a5bc32 commit 5a33c95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/data-modeling.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ Here is a list of all available core **field** attributes:
- `@unique`: Defines a unique constraint.
- `@map(_ name: String)`: Defines the raw column name the field is mapped to.
- `@default(_ expr: Expr)`: Specifies a default value.
- `@relation(_ fields?: Field[], name?: String, onDelete?: CascadeEnum)`: Disambiguates relationships when needed. More details [here](./relations.md/#the-relation-attribute).
- `@relation(_ fields?: Field[], name?: String)`: Disambiguates relationships when needed. More details [here](./relations.md/#the-relation-attribute).
- `@updatedAt`: Updates the time to `now()` whenever a record is updated.

Here is a list of all available core **block** attributes:
Expand Down
6 changes: 2 additions & 4 deletions docs/relations.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,12 @@ The `@relation` attribute disambiguates relationships when needed.
It has the following signature:

```prisma
@relation(_name: String?, references: Identifier[]?, onDelete: OnDeleteEnum?)
@relation(_name: String?, references: Identifier[]?)
```

- `references` _(optional)_: List of [field](./data-modeling.md#fields) names to reference.
- `name` _(optional)_: Defines the _name_ of the relationship. If this a m:m-relation, the name also determines the name of the relation table in the underlying database.
- `onDelete` _(optional)_: Defines what to do when the referenced relation is deleted.
- `NONE` (_default_): Set the field to `null`.
- `CASCADE`: Also delete this entry.


> **Note**: Cascading deletes are not yet implemented. You can track the progress of this feature in this [GitHub issue](https://github.com/prisma/prisma2/issues/267).
Expand Down

0 comments on commit 5a33c95

Please sign in to comment.