Reason: [migration-engine/connectors/sql-migration-connector/src/lib.rs:237:9]
Deserializing the database migration failed.:
Error("unknown variant `nextval(\"_Migration_revision_seq\"::regclass)`, expected
one of `VALUE`, `NOW`, `SEQUENCE`, `DBGENERATED`", line: 0, column: 0)
prisma2 migrate save --experimentalThe command should create a new migration.
````
datasource db {
provider = "postgresql"
url = env("POSTGRES_URL")
}
generator client {
provider = "prisma-client-js"
binaryTargets = ["native"]
}
model User {
id String @id @default(cuid())
email String @unique
password String
name String
role Role @default(USER)
}
model Product {
id String @id @default(cuid())
name String
description String
category Category
tubeQuantities Int[]
canQuantities Int[]
oneLiterQuantities Int[]
tenLiterQuantities Int[]
thirtyLiterQuantities Int[]
oneHundredTwentyLiterQuantities Int[]
twoHundredTenLiterQuantities Int[]
}
enum Role {
USER
ADMIN
}
enum Category {
NEUTEC
AIRTEC
ALTEC
SATEC
SYNTEC
ZUBEHOER
}
````
2367
@prisma/cli : 2.0.0-preview025
Current platform : darwin
Query Engine : prisma 8814060fa684793b73d07dbfccd4b7777b3361ae (at /Users/marius/Documents/Projekte/MHS_Technologies/Neutec/neutec-backend/node_modules/@prisma/cli/query-engine-darwin)
Migration Engine : migration-engine-cli 8814060fa684793b73d07dbfccd4b7777b3361ae (at /Users/marius/Documents/Projekte/MHS_Technologies/Neutec/neutec-backend/node_modules/@prisma/cli/migration-engine-darwin)
Introspection Engine : introspection-core 8814060fa684793b73d07dbfccd4b7777b3361ae (at /Users/marius/Documents/Projekte/MHS_Technologies/Neutec/neutec-backend/node_modules/@prisma/cli/introspection-engine-darwin)
There was a change in introspection that caused the saved migrations format to break - we hadn't detected that before so it's not in the release notes, I think that if you delete your migrations folder and apply migrate again, the problem should go away. Sorry for the breakage!
Can confirm that deleting the migration folder and content of the "_Migration" table in the database resolves this problem - just deleting the folder was not enough. I guess that makes sense though.
Edit: I should add that you will not lose any data by doing this.
Can confirm that deleting the migration folder and content of the "_Migration" table in the database resolves this problem - just deleting the folder was not enough.
Can confirm this too, now everything works as expected.
Thank you for your help!
Most helpful comment
Can confirm that deleting the migration folder and content of the "_Migration" table in the database resolves this problem - just deleting the folder was not enough. I guess that makes sense though.
Edit: I should add that you will not lose any data by doing this.