I'm unable to create a migration with the latest p...
# orm-help
i
I'm unable to create a migration with the latest prisma-cli. Am I missing anything?
npx prisma migrate save --name "add posts" --experimental
Copy code
» migrate save is not a prisma command
Copy code
// schema.prisma
model User {
  id        Int      @id @default(autoincrement())
  createdAt DateTime @default(now())
  email     String   @unique
  name      String?
  role      Role     @default(USER)
  posts     Post[]
}

model Post {
  id Int @id @default(autoincrement())
  createdAt DateTime @default(now())
  updatedAt DateTime @default(now())
  title String?
  body String?
  author User? @relation(fields: [authorId], references: [id])
  authorId Int?
}

enum Role {
  USER
  ADMIN
}
✔️ 1
r
Hey @Ivor 👋 What version of
@prisma/cli
are you using?
i
prisma/1.34.10 @prisma/cli@2.1.3
r
You have Prisma 1 installed. Please remove
prisma
from your packages and just keep
@prisma/cli
Also even if you need Prisma 1, you can install it as
npm install prisma1
.
i
Beautiful. Removed
prisma
from global.
Thanks
💯 1