Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add note under datetime in schema reference #5801

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions content/200-orm/050-overview/500-databases/400-mysql.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,17 @@ The MySQL connector maps the [scalar types](/orm/prisma-schema/data-model/models

### Native type mapping from Prisma ORM to MySQL

| Prisma ORM | MySQL | Notes |
| ---------- | ---------------- | ------------------------------------------------ |
| `String` | `VARCHAR(191)` | |
| `Boolean` | `BOOLEAN` | In MySQL `BOOLEAN` is a synonym for `TINYINT(1)` |
| `Int` | `INT` | |
| `BigInt` | `BIGINT` |
| `Float` | `DOUBLE` | |
| `Decimal` | `DECIMAL(65,30)` |
| `DateTime` | `DATETIME(3)` | |
| `Json` | `JSON` | Supported in MySQL 5.7+ only |
| `Bytes` | `LONGBLOB` |
| Prisma ORM | MySQL | Notes |
| ---------- | ---------------- | ------------------------------------------------------------------------------------- |
| `String` | `VARCHAR(191)` | |
| `Boolean` | `BOOLEAN` | In MySQL `BOOLEAN` is a synonym for `TINYINT(1)` |
| `Int` | `INT` | |
| `BigInt` | `BIGINT` | |
| `Float` | `DOUBLE` | |
| `Decimal` | `DECIMAL(65,30)` | |
| `DateTime` | `DATETIME(3)` | Currently, Prisma ORM does not support zero dates (`0000-00-00`, `00:00:00`) in MySQL |
| `Json` | `JSON` | Supported in MySQL 5.7+ only |
| `Bytes` | `LONGBLOB` | |

### Native type mapping from Prisma ORM to MariaDB

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,7 @@ Floating point number.
#### Remarks

- Prisma Client returns all `DateTime` as native [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) objects.
- Currently, Prisma ORM [does not support](https://github.com/prisma/prisma/issues/5006) [zero dates](https://dev.mysql.com/doc/refman/8.3/en/date-and-time-types.html#:~:text=The%20following%20table%20shows%20the%20format%20of%20the%20%E2%80%9Czero%E2%80%9D%20value%20for%20each%20type) (`0000-00-00 00:00:00`, `0000-00-00`, `00:00:00`) in MySQL.

#### Default type mappings

Expand Down
Loading