Migration adds creation of foreign key that already exists
On a MySql database there is a Download table that has this definition of a foreign key (removed columns for reading purposes):
This table already has a definition in the
When I update the
So what I did was running it with
Version used for Prisma
This table already has a definition in the
schema.prisma file and has been migrated earlier. So the foreign key is already defined and it exists.When I update the
schema.prisma file with new models but no change in the definition of the Download model, the migration creates a line to add the foreign key to the Download table:So what I did was running it with
--create-only , manually delete this line and then deploy the database. However, this could happen again in upcoming migrations and I was wondering if this can be fixed. So any ideas where I should look?Version used for Prisma
"prisma": "6.18.0".