Migrate: @dbgenerated with @db.Time(0) keeps generating new migrations #6382
Labels
bug/2-confirmed
Bug has been reproduced and confirmed.
kind/bug
A reported bug.
team/schema
Issue for team Schema.
tech/engines
Issue for tech Engines.
topic: dates / DateTime
topic: @db.Time
Native type `Time`
topic: dbgenerated
topic: endless migrations
topic: mysql
topic: prisma migrate dev
CLI: prisma migrate dev
Milestone
Bug description
Whenever you use a schema field decorated with
DateTime @default(dbgenerated("\"00:00:00\"")) @db.Time(0)
and runnpx prisma migrate dev
, you are asked for a new migration name but the generated migration is always the sameHow to reproduce
Create a model
Run
npx prisma migrate dev
, after that another time, it keeps asking for a new migration nameExpected behavior
There should be no prompt for a new migration since the output is always the same
Environment & setup
The text was updated successfully, but these errors were encountered: