Prisma Migrate generates incorrect sql when chaining different types of table altering operations (remove map
from @id
, add native type to other field)
#24331
Labels
bug/2-confirmed
Bug has been reproduced and confirmed.
domain/schema
Issue in the "Schema" domain: Prisma Schema, Introspection, Migrations etc.
kind/bug
A reported bug.
topic: broken migrations
topic: migrate
topic: postgresql
topic: prisma migrate dev
CLI: prisma migrate dev
Bug description
If you perform two different types of alteration on a table for instance renaming a constraint and altering the data type of a column then
prisma migrate dev
will generate incorrect sql code.How to reproduce
prisma migrate dev
This is because the generated sql will look like this:
Expected behavior
the generated sql should look like this :
Prisma information
// Add your schema.prisma
// Add your code using Prisma Client
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: