migrate icon indicating copy to clipboard operation
migrate copied to clipboard

Migration issue on changing userId field to unique. related to #619

Open wortforfilms opened this issue 6 years ago • 3 comments

Hi Prisma Team! Prisma Migrate just crashed.

Versions

Name Version
Platform darwin
Node v10.16.0
Prisma CLI 2.10.0
Binary af1ae11a423edfb5d24092a85be11fa77c5e499c

Error

Error: Error in migration engine.
Reason: [migration-engine/connectors/sql-migration-connector/src/sql_renderer/postgres_renderer.rs:213:26] AlterColumn on unknown column

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

**** old ****** model Worrier { worrierId String @id @default(cuid()) user User addedResources Resource[] userUserId String
createdAt DateTime @default(now()) }

***** new ****** model Worrier { worrierId String @id @default(cuid()) user User addedResources Resource[] userUserId String @unique createdAt DateTime @default(now()) }

#619

wortforfilms avatar Oct 28 '20 17:10 wortforfilms

This is a known issue in the new release, thanks for reporting and posting with the schema — I'll give an update as soon as it is fixed.

tomhoule avatar Oct 29 '20 06:10 tomhoule

We worked on this problem and just released a fix in 2.10.1. Can you confirm that this does not happen anymore with the new version?

tomhoule avatar Oct 30 '20 07:10 tomhoule

Other users confirmed 2.10.1 works for them, so let's close this issue. Please open a new one if necessary.

tomhoule avatar Nov 02 '20 07:11 tomhoule