-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
can't use date
type as primary key
#8982
Comments
Probably related for SQL Server: #10378 |
FWIW, As mentioned in #10378 , the workaround is removing milliseconds.
|
|
I knew this is a solution. And I use moment().startOf('day') to resolve this problem. |
If you close the issue, we won't be able to track this and fix it. We are people and we make mistakes (or overlook details). |
I'm sorry, commented yestoday, maybe click the wrong button. |
Agreed, just wanted to put this so other folks don't have to figure out themselves like I did. |
Still reproducible with 4.3.1. Debug logs:
It's very related to some other similar issues using dates and times. |
date
type as primary key
Bug description
If mysql date type field is not a primary key, the create function will success.
But define a Composite Primary Key with Integer and Date, will cause an error
How to reproduce
output:
Expected behavior
No response
Prisma information
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: