PrismaP
Prisma17mo ago
6 replies
grizzle

Upgrade prisma 2 to 5 and got renamed index error

Hi! I recently upgrade prisma 2 to 5. and tried to
prisma migrate dev
and got this message.
Here is message and prisma shema.

- schema.prisma
model Tag { id Int @id @default(autoincrement()) text String @unique createdAt DateTime @default(now()) updatedAt DateTime @updatedAt blogs Blog[] @relation("BlogToTag") projects Project[] @relation("ProjectToTag") } model User { id Int @id @default(autoincrement()) email String @unique password String }


- error code
Drift detected: Your database schema is not in sync with your migration history.

The following is a summary of the differences between the expected database schema given your migrations files, and the actual schema of the database.

It should be understood as the set of changes to get from the expected schema to the actual schema.

[] Changed the Tag table
[
] Renamed index Tag.text_unique to Tag_text_key

[] Changed the
User
table
[
] Renamed index User.email_unique to User_email_key

I think theres change index name on unique. But I cant find out how to solve...
Is there anybody know how to solve this please?
Was this page helpful?