Report ID: 3289
model Post {
id Int @id @default(autoincrement())
categories Category[] @relation(references: [id])
}
model Category {
id Int @id @default(autoincrement())
posts Post[] @relation(references: [id])
}
Steps to reproduce the behavior:
Then another error occured.
Environment variables loaded from ./prisma/.env
Error: Invalid migration step NaN
After some tries of migration.
However, there are tables with single column: id.
migration undo success without Error
datasource postgresql {
provider = "postgresql"
url = env("DATABASE_URL")
}
model Post {
id Int @id @default(autoincrement())
categories Category[] @relation(references: [id])
}
model Category {
id Int @id @default(autoincrement())
posts Post[] @relation(references: [id])
}
Prisma version:
@prisma/cli : 2.0.0-beta.2
Current platform : darwin
Query Engine : query-engine 76857c35ba1e1764dd5473656ecbbb2f739e1822
Migration Engine : migration-engine-cli 76857c35ba1e1764dd5473656ecbbb2f739e1822
Introspection Engine : introspection-core 76857c35ba1e1764dd5473656ecbbb2f739e1822
Node.js version: v13.11.0
I can confirm this bug. Thanks for reporting!
We think it may be fixed. Can you please try reproducing again @pantharshit00 ?
Yes, this is already fixed in 2.9.0
╰─ npx prisma migrate down --experimental ─╯
Environment variables loaded from prisma/.env
Prisma Schema loaded from prisma/schema.prisma
Rolling back migration 20201015083605-init-schema
🚀 Done with down in 101ms
Closing..