prisma / migrate

Issues for Prisma Migrate are now tracked at prisma/prisma. This repo was used to track issues for Prisma Migrate Experimental and is now deprecated.
https://www.prisma.io/docs/concepts/components/prisma-migrate
Apache License 2.0
766 stars 22 forks source link

datamodel_calculater fails during a migrate #651

Closed kevinsimper closed 3 years ago

kevinsimper commented 4 years ago

Hi Prisma Team! Prisma Migrate just crashed.

Versions

Name Version
Platform darwin
Node v14.4.0
Prisma CLI 2.11.0
Binary 58369335532e47bdcec77a2f1e7c1fb83a463918

Error

Error: Error in migration engine.
Reason: [migration-engine/core/src/migration/datamodel_calculator.rs:461:85] called `Option::unwrap()` on a `None` value

Please create an issue in the migrate repo with
your `schema.prisma` and the prisma command you tried to use 🙏:
https://github.com/prisma/migrate/issues/new

Description

We made a migration that had zero migrations since it was adding some missing connections. applied: 0

It was solved by removing the empty migration and removing it from _Migration table.

tomhoule commented 3 years ago

Thanks for taking the time to report this issue!

We've recently released a Prisma Migrate Preview (2.1.3.0 release notes), which has quite a few changes compared to the previous experimental version. We believe this issue is no longer relevant in this new version, so we are closing this.

We would encourage you to try out Prisma Migrate Preview. If you come across this or any other issue in the preview version, please feel free to open a new issue in prisma/prisma. For general feedback on Prisma Migrate Preview, feel free to chime in on this issue.