migrate dev
can not be used to fix "invalid" migrations over time
#8064
Labels
kind/improvement
An improvement to existing feature and code.
team/schema
Issue for team Schema.
topic: prisma migrate dev --create-only
CLI: prisma migrate dev --create-only
topic: prisma migrate dev
CLI: prisma migrate dev
#5782 means that in 2.26.0 with
referentialActions
enable we still by default create invalid migrations for SQL Server. When applying it, you get an error message that let's you (potentially) understand what you need to do - add aonUpdate: Cascade
to a@relation
in your schema.Unfortunately you can not use
migrate dev
to iterate on that, as when you do the change and runmigrate dev --create-only
again, it fails with a shadow database error as the first migration can not be applied to the shadow database :(Instead I have to delete the old migration, and create a new one that does everything in 1 step.
The text was updated successfully, but these errors were encountered: