Skip to content

Commit

Permalink
Update data-modeling.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolasburk committed Dec 13, 2019
1 parent 48ae9e7 commit 25d79e7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions docs/data-modeling.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,15 +311,13 @@ Prisma core provides a set of functions that _must_ be implemented by every conn

- `uuid()`: Generates a fresh [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier)
- `cuid()`: Generates a fresh [cuid](https://github.com/ericelliott/cuid)
- `between(min, max)`: Generates a random int in the specified range
- `now()`: Current date and time

Default values using a dynamic generator can be specified as follows:

```groovy
model User {
age Int @default(between([ 1, 5 ]))
height Float @default(between([ 1, 5 ]))
id String @id @default(cuid())
createdAt DateTime @default(now())
}
```
Expand Down

0 comments on commit 25d79e7

Please sign in to comment.