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

use datetime precision in information_schema.columns.datetime_precision #2610

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

jycor
Copy link
Contributor

@jycor jycor commented Jul 30, 2024

When determining if a schema change occurred, one of the tables Prisma looks at is the information_schema.columns.
Here, we incorrectly mark all datetime and timestamp columns as with a precision of 6.
If a table has type DATETIME(3), Prisma would think there was a schema change, and perform a migration when one isn't needed.

This PR addresses this issue by having the information_schema.columns table accurately reflect the datetime preicision of the columns,

fixes: dolthub/dolt#8173

Copy link
Contributor

@max-hoffman max-hoffman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jycor jycor merged commit 676511f into main Jul 30, 2024
9 checks passed
@jycor jycor deleted the james/prisma branch July 30, 2024 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

prisma migrate dev, generating changes to columns of the date type in loop
3 participants