Closed marcjulian closed 4 years ago
I am unable to reproduce this. Can you please share your datamodel with us?
Of course, it appears in this project https://github.com/fivethree-team/nestjs-prisma-starter/tree/prisma2
datasource db {
provider = "sqlite"
url = "file:../db/dev.db"
}
generator photon {
provider = "photonjs"
}
model User {
id String @default(cuid()) @id @unique
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
email String @unique
password String
firstname String?
lastname String?
posts Post[]
role Role
}
model Post {
id String @default(cuid()) @id @unique
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
published Boolean
title String
content String?
author User?
}
enum Role {
ADMIN
USER
}
I can confirm this bug.
I think it is related to https://github.com/prisma/prisma2/issues/936#issuecomment-558578657 so for the time being don't use a relative path.
Thanks for looking into the issue
Thanks a lot for reporting 🙏
This issue is fixed in the latest alpha version of prisma2
.
You can try it out with npm i -g prisma2@alpha
.
In case it’s not fixed for you - please let us know and we’ll reopen this issue!
I tested it with prisma2 version 2.0.0-alpha.453 and hangs at creating the db at path file:../db/dev.db
I can confirm this is still an issue.
(Note: only happens now when folder db doesn't exists)
This is a problem in the create database RPC of the migration engine.
This is fixed by https://github.com/prisma/prisma-engine/pull/379 - it should be in the next alpha release :)
The command
prisma2 lift save
andprisma2 lift up
hangs atCreating database ....
.This behavior exists in the following versions I tested: prisma2@2.0.0-preview016.2, binary version: b72fd0a786adc77ba6c61d0a9637ff0371e433b0 prisma2@2.0.0-alpha.351, binary version: b8d90fea39d266b128b4d748db5aca8505bb1026
It still works with the version prisma2@2.0.0-preview016, binary version: 377e2db71bae5da19d0090558c8819ff57dfdfc6
Env Mac 10.14.6